HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpbiancoarte/wp-content/plugins/qi-blocks/assets/dist/parallax-images.js
(()=>{var e={2:(e,t,a)=>{var l=a(4335)(Object.keys,Object);e.exports=l},80:(e,t,a)=>{var l=a(6025),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,a=l(t,e);return!(a<0)&&(a==t.length-1?t.pop():i.call(t,a,1),--this.size,!0)}},270:(e,t,a)=>{var l=a(7068),i=a(346);e.exports=function e(t,a,n,o,r){return t===a||(null==t||null==a||!i(t)&&!i(a)?t!=t&&a!=a:l(t,a,n,o,e,r))}},294:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},346:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},689:(e,t,a)=>{var l=a(2),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,a,n,o,r){var s=1&a,c=l(e),u=c.length;if(u!=l(t).length&&!s)return!1;for(var m=u;m--;){var p=c[m];if(!(s?p in t:i.call(t,p)))return!1}var d=r.get(e),b=r.get(t);if(d&&b)return d==t&&b==e;var g=!0;r.set(e,t),r.set(t,e);for(var f=s;++m<u;){var h=e[p=c[m]],k=t[p];if(n)var _=s?n(k,h,p,t,e,r):n(h,k,p,e,t,r);if(!(void 0===_?h===k||o(h,k,a,n,r):_)){g=!1;break}f||(f="constructor"==p)}if(g&&!f){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(g=!1)}return r.delete(e),r.delete(t),g}},828:(e,t,a)=>{var l=a(7556);e.exports=function(e){return null==e?"":l(e)}},882:e=>{e.exports=function(e,t,a,l){var i=-1,n=null==e?0:e.length;for(l&&n&&(a=e[++i]);++i<n;)a=t(a,e[i],i,e);return a}},999:(e,t,a)=>{var l=a(9302),i=a(6800);e.exports=function(e){return l(function(t,a){var l=-1,n=a.length,o=n>1?a[n-1]:void 0,r=n>2?a[2]:void 0;for(o=e.length>3&&"function"==typeof o?(n--,o):void 0,r&&i(a[0],a[1],r)&&(o=n<3?void 0:o,n=1),t=Object(t);++l<n;){var s=a[l];s&&e(t,s,l,o)}return t})}},1033:e=>{e.exports=function(e,t,a){switch(a.length){case 0:return e.call(t);case 1:return e.call(t,a[0]);case 2:return e.call(t,a[0],a[1]);case 3:return e.call(t,a[0],a[1],a[2])}return e.apply(t,a)}},1074:e=>{e.exports=function(e){return e.split("")}},1175:(e,t,a)=>{var l=a(6025);e.exports=function(e,t){var a=this.__data__,i=l(a,e);return i<0?(++this.size,a.push([e,t])):a[i][1]=t,this}},1331:(e,t,a)=>{var l=a(2552),i=a(8879),n=a(346),o=Function.prototype,r=Object.prototype,s=o.toString,c=r.hasOwnProperty,u=s.call(Object);e.exports=function(e){if(!n(e)||"[object Object]"!=l(e))return!1;var t=i(e);if(null===t)return!0;var a=c.call(t,"constructor")&&t.constructor;return"function"==typeof a&&a instanceof a&&s.call(a)==u}},1733:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},1791:(e,t,a)=>{var l=a(6547),i=a(3360);e.exports=function(e,t,a,n){var o=!a;a||(a={});for(var r=-1,s=t.length;++r<s;){var c=t[r],u=n?n(a[c],e[c],c,a,e):void 0;void 0===u&&(u=e[c]),o?i(a,c,u):l(a,c,u)}return a}},1882:(e,t,a)=>{var l=a(2552),i=a(3805);e.exports=function(e){if(!i(e))return!1;var t=l(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1961:(e,t,a)=>{var l=a(9653);e.exports=function(e,t){var a=t?l(e.buffer):e.buffer;return new e.constructor(a,e.byteOffset,e.length)}},1986:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},2054:e=>{var t="\\ud800-\\udfff",a="["+t+"]",l="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",n="[^"+t+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",r="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+l+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?",u=c+s+("(?:\\u200d(?:"+[n,o,r].join("|")+")"+c+s+")*"),m="(?:"+[n+l+"?",l,o,r,a].join("|")+")",p=RegExp(i+"(?="+i+")|"+m+u,"g");e.exports=function(e){return e.match(p)||[]}},2225:e=>{var t="\\ud800-\\udfff",a="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",i="A-Z\\xc0-\\xd6\\xd8-\\xde",n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+n+"]",r="\\d+",s="["+a+"]",c="["+l+"]",u="[^"+t+n+r+a+l+i+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",d="["+i+"]",b="(?:"+c+"|"+u+")",g="(?:"+d+"|"+u+")",f="(?:['’](?:d|ll|m|re|s|t|ve))?",h="(?:['’](?:D|LL|M|RE|S|T|VE))?",k="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",_="[\\ufe0e\\ufe0f]?",v=_+k+("(?:\\u200d(?:"+["[^"+t+"]",m,p].join("|")+")"+_+k+")*"),y="(?:"+[s,m,p].join("|")+")"+v,w=RegExp([d+"?"+c+"+"+f+"(?="+[o,d,"$"].join("|")+")",g+"+"+h+"(?="+[o,d+b,"$"].join("|")+")",d+"?"+b+"+"+f,d+"+"+h,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",r,y].join("|"),"g");e.exports=function(e){return e.match(w)||[]}},2404:(e,t,a)=>{var l=a(270);e.exports=function(e,t){return l(e,t)}},2428:e=>{e.exports=function(){return!1}},2507:(e,t,a)=>{var l=a(8754),i=a(9698),n=a(3912),o=a(3222);e.exports=function(e){return function(t){t=o(t);var a=i(t)?n(t):void 0,r=a?a[0]:t.charAt(0),s=a?l(a,1).join(""):t.slice(1);return r[e]()+s}}},2552:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},2824:(e,t,a)=>{var l=a(7805),i=a(3290),n=a(1961),o=a(3007),r=a(5529),s=a(2428),c=a(6449),u=a(3693),m=a(3656),p=a(1882),d=a(3805),b=a(1331),g=a(7167),f=a(4974),h=a(9884);e.exports=function(e,t,a,k,_,v,y){var w=f(e,a),A=f(t,a),I=y.get(A);if(I)l(e,a,I);else{var S=v?v(w,A,a+"",e,t,y):void 0,x=void 0===S;if(x){var q=c(A),E=!q&&m(A),T=!q&&!E&&g(A);S=A,q||E||T?c(w)?S=w:u(w)?S=o(w):E?(x=!1,S=i(A,!0)):T?(x=!1,S=n(A,!0)):S=[]:b(A)||s(A)?(S=w,s(w)?S=h(w):d(w)&&!p(w)||(S=r(A))):x=!1}x&&(y.set(A,S),_(S,A,k,v,y),y.delete(A)),l(e,a,S)}}},2865:e=>{e.exports=function(e){return e}},3007:e=>{e.exports=function(e,t){var a=-1,l=e.length;for(t||(t=Array(l));++a<l;)t[a]=e[a];return t}},3221:e=>{e.exports=function(e){return function(t,a,l){for(var i=-1,n=Object(t),o=l(t),r=o.length;r--;){var s=o[e?r:++i];if(!1===a(n[s],s,n))break}return t}}},3222:e=>{e.exports=function(e){return e}},3243:(e,t,a)=>{var l=a(6110),i=function(){try{var e=l(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},3290:(e,t,a)=>{e=a.nmd(e);var l=a(9325),i=t&&!t.nodeType&&t,n=i&&e&&!e.nodeType&&e,o=n&&n.exports===i?l.Buffer:void 0,r=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var a=e.length,l=r?r(a):new e.constructor(a);return e.copy(l),l}},3360:(e,t,a)=>{var l=a(3243);e.exports=function(e,t,a){"__proto__"==t&&l?l(e,t,{configurable:!0,enumerable:!0,value:a,writable:!0}):e[t]=a}},3488:e=>{e.exports=function(e){return e}},3656:e=>{e.exports=function(){return!1}},3693:(e,t,a)=>{var l=a(4894),i=a(346);e.exports=function(e){return i(e)&&l(e)}},3702:e=>{e.exports=function(){this.__data__=[],this.size=0}},3805:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},3912:(e,t,a)=>{var l=a(1074),i=a(9698),n=a(2054);e.exports=function(e){return i(e)?n(e):l(e)}},4058:(e,t,a)=>{var l=a(4792),i=a(5539)(function(e,t,a){return t=t.toLowerCase(),e+(a?l(t):t)});e.exports=i},4248:e=>{e.exports=function(e,t){for(var a=-1,l=null==e?0:e.length;++a<l;)if(t(e[a],a,e))return!0;return!1}},4335:e=>{e.exports=function(e,t){return function(a){return e(t(a))}}},4739:(e,t,a)=>{var l=a(6025);e.exports=function(e){var t=this.__data__,a=l(t,e);return a<0?void 0:t[a][1]}},4792:(e,t,a)=>{var l=a(3222),i=a(5808);e.exports=function(e){return i(l(e).toLowerCase())}},4840:(e,t,a)=>{var l="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g;e.exports=l},4894:(e,t,a)=>{var l=a(1882),i=a(294);e.exports=function(e){return null!=e&&i(e.length)&&!l(e)}},4974:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},5160:e=>{e.exports=function(e,t,a){var l=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(a=a>i?i:a)<0&&(a+=i),i=t>a?0:a-t>>>0,t>>>=0;for(var n=Array(i);++l<i;)n[l]=e[l+t];return n}},5250:(e,t,a)=>{var l=a(7217),i=a(7805),n=a(6649),o=a(2824),r=a(3805),s=a(7241),c=a(4974);e.exports=function e(t,a,u,m,p){t!==a&&n(a,function(n,s){if(p||(p=new l),r(n))o(t,a,s,u,e,m,p);else{var d=m?m(c(t,s),n,s+"",t,a,p):void 0;void 0===d&&(d=n),i(t,s,d)}},s)}},5287:(e,t)=>{"use strict";var a=Symbol.for("react.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),r=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.iterator;var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,f={};function h(e,t,a){this.props=e,this.context=t,this.refs=f,this.updater=a||b}function k(){}function _(e,t,a){this.props=e,this.context=t,this.refs=f,this.updater=a||b}h.prototype.isReactComponent={},h.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},h.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=h.prototype;var v=_.prototype=new k;v.constructor=_,g(v,h.prototype),v.isPureReactComponent=!0;var y=Array.isArray,w=Object.prototype.hasOwnProperty,A={current:null},I={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,l){var i,n={},o=null,r=null;if(null!=t)for(i in void 0!==t.ref&&(r=t.ref),void 0!==t.key&&(o=""+t.key),t)w.call(t,i)&&!I.hasOwnProperty(i)&&(n[i]=t[i]);var s=arguments.length-2;if(1===s)n.children=l;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];n.children=c}if(e&&e.defaultProps)for(i in s=e.defaultProps)void 0===n[i]&&(n[i]=s[i]);return{$$typeof:a,type:e,key:o,ref:r,props:n,_owner:A.current}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var q=/\/+/g;function E(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function T(e,t,i,n,o){var r=typeof e;"undefined"!==r&&"boolean"!==r||(e=null);var s=!1;if(null===e)s=!0;else switch(r){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case a:case l:s=!0}}if(s)return o=o(s=e),e=""===n?"."+E(s,0):n,y(o)?(i="",null!=e&&(i=e.replace(q,"$&/")+"/"),T(o,t,i,"",function(e){return e})):null!=o&&(x(o)&&(o=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,i+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(q,"$&/")+"/")+e)),t.push(o)),1;if(s=0,n=""===n?".":n+":",y(e))for(var c=0;c<e.length;c++){var u=n+E(r=e[c],c);s+=T(r,t,i,u,o)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(r=e.next()).done;)s+=T(r=r.value,t,i,u=n+E(r,c++),o);else if("object"===r)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function C(e,t,a){if(null==e)return e;var l=[],i=0;return T(e,l,"","",function(e){return t.call(a,e,i++)}),l}function N(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},O={transition:null};function B(){throw Error("act(...) is not supported in production builds of React.")}t.createElement=S},5288:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5364:(e,t,a)=>{var l=a(5250),i=a(999)(function(e,t,a){l(e,t,a)});e.exports=i},5434:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},5527:e=>{e.exports=function(){return!1}},5529:(e,t,a)=>{var l=a(9344),i=a(8879),n=a(5527);e.exports=function(e){return"function"!=typeof e.constructor||n(e)?{}:l(i(e))}},5539:(e,t,a)=>{var l=a(882),i=a(828),n=a(6645),o=RegExp("['’]","g");e.exports=function(e){return function(t){return l(n(i(t).replace(o,"")),e,"")}}},5808:(e,t,a)=>{var l=a(2507)("toUpperCase");e.exports=l},5861:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5911:(e,t,a)=>{var l=a(8859),i=a(4248),n=a(9219);e.exports=function(e,t,a,o,r,s){var c=1&a,u=e.length,m=t.length;if(u!=m&&!(c&&m>u))return!1;var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var b=-1,g=!0,f=2&a?new l:void 0;for(s.set(e,t),s.set(t,e);++b<u;){var h=e[b],k=t[b];if(o)var _=c?o(k,h,b,t,e,s):o(h,k,b,e,t,s);if(void 0!==_){if(_)continue;g=!1;break}if(f){if(!i(t,function(e,t){if(!n(f,t)&&(h===e||r(h,e,a,o,s)))return f.push(t)})){g=!1;break}}else if(h!==k&&!r(h,k,a,o,s)){g=!1;break}}return s.delete(e),s.delete(t),g}},6025:(e,t,a)=>{var l=a(5288);e.exports=function(e,t){for(var a=e.length;a--;)if(l(e[a][0],t))return a;return-1}},6110:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},6131:e=>{e.exports=function(e,t,a){for(var l=a-1,i=e.length;++l<i;)if(e[l]===t)return l;return-1}},6449:e=>{var t=Array.isArray;e.exports=t},6540:(e,t,a)=>{"use strict";e.exports=a(5287)},6547:(e,t,a)=>{var l=a(3360),i=a(5288),n=Object.prototype.hasOwnProperty;e.exports=function(e,t,a){var o=e[t];n.call(e,t)&&i(o,a)&&(void 0!==a||t in e)||l(e,t,a)}},6645:(e,t,a)=>{var l=a(1733),i=a(5434),n=a(3222),o=a(2225);e.exports=function(e,t,a){return e=n(e),void 0===(t=a?void 0:t)?i(e)?o(e):l(e):e.match(t)||[]}},6649:(e,t,a)=>{var l=a(3221)();e.exports=l},6757:(e,t,a)=>{var l=a(1033),i=Math.max;e.exports=function(e,t,a){return t=i(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,r=i(n.length-t,0),s=Array(r);++o<r;)s[o]=n[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=n[o];return c[t]=a(s),l(e,this,c)}}},6800:e=>{e.exports=function(){return!1}},6942:(e,t)=>{var a;!function(){"use strict";var l={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=o(e,n(a)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var a in e)l.call(e,a)&&e[a]&&(t=o(t,a));return t}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(a=function(){return i}.apply(t,[]))||(e.exports=a)}()},7068:(e,t,a)=>{var l=a(7217),i=a(5911),n=a(1986),o=a(689),r=a(5861),s=a(6449),c=a(3656),u=a(7167),m="[object Arguments]",p="[object Array]",d="[object Object]",b=Object.prototype.hasOwnProperty;e.exports=function(e,t,a,g,f,h){var k=s(e),_=s(t),v=k?p:r(e),y=_?p:r(t),w=(v=v==m?d:v)==d,A=(y=y==m?d:y)==d,I=v==y;if(I&&c(e)){if(!c(t))return!1;k=!0,w=!1}if(I&&!w)return h||(h=new l),k||u(e)?i(e,t,a,g,f,h):n(e,t,v,a,g,f,h);if(!(1&a)){var S=w&&b.call(e,"__wrapped__"),x=A&&b.call(t,"__wrapped__");if(S||x){var q=S?e.value():e,E=x?t.value():t;return h||(h=new l),f(q,E,a,g,h)}}return!!I&&(h||(h=new l),o(e,t,a,g,f,h))}},7167:e=>{e.exports=function(){return!1}},7217:(e,t,a)=>{var l=a(3702),i=a(80),n=a(4739),o=a(8655),r=a(1175);function s(e){var t=-1,a=null==e?0:e.length;for(this.clear();++t<a;){var l=e[t];this.set(l[0],l[1])}}s.prototype.clear=l,s.prototype.delete=i,s.prototype.get=n,s.prototype.has=o,s.prototype.set=r,e.exports=s},7241:e=>{e.exports=function(e){var t=[];if(null!=e)for(var a in Object(e))t.push(a);return t}},7556:e=>{e.exports=function(e){return e}},7584:(e,t,a)=>{"use strict";a.d(t,{A:()=>i}),document.addEventListener("DOMContentLoaded",function(){l.init()});const l={init:function(){this.holder=document.querySelectorAll(".qi-block-parallax-images"),this.holder.length&&[...this.holder].map(e=>{l.initItem(e)})},getRealCurrentItem:function(e){return"string"==typeof e&&""!==e&&(e=qiBlocksEditor.qodefGetCurrentBlockElement.get(e)),e},initItem:function(e){if(!(e=l.getRealCurrentItem(e)))return;("object"!=typeof qiBlocksEditor?qiBlocks:qiBlocksEditor).qodefWaitForImages.check(e,function(){l.setParallaxElements(e)})},setParallaxElements:function(e){const t=e.querySelectorAll(".qodef-e-parallax-image"),a=e.querySelector(".qodef-e-main-image");if(!a)return;const l=a.querySelector("img"),i=a.getAttribute("data-parallax-main");let n=40,o=-50,r=30,s=15;window.innerWidth>1024&&(i&&(n=i,r=Math.abs(parseInt(n,10)/.9)),l.setAttribute("data-parallax",'{"y" : '+n+' , "smoothness": '+r+"}"),t.forEach(e=>{const t=e.querySelector("img"),a=e.getAttribute("data-parallax");t&&(a&&(o=a,s=Math.abs(parseInt(o,10)/2.5)),t.setAttribute("data-parallax",'{"y" : '+o+' , "smoothness": '+s+"}"))}),setTimeout(()=>{e.querySelectorAll("[data-parallax]").length&&ParallaxScroll.init()},document.body.classList.contains("wp-admin")?600:0))}},i=l},7805:(e,t,a)=>{var l=a(3360),i=a(5288);e.exports=function(e,t,a){(void 0!==a&&!i(e[t],a)||void 0===a&&!(t in e))&&l(e,t,a)}},7828:(e,t,a)=>{var l=a(9325).Uint8Array;e.exports=l},8655:(e,t,a)=>{var l=a(6025);e.exports=function(e){return l(this.__data__,e)>-1}},8754:(e,t,a)=>{var l=a(5160);e.exports=function(e,t,a){var i=e.length;return a=void 0===a?i:a,!t&&a>=i?e:l(e,t,a)}},8859:(e,t,a)=>{var l=a(6449);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return l(e)?e:[e]}},8879:(e,t,a)=>{var l=a(4335)(Object.getPrototypeOf,Object);e.exports=l},9219:(e,t,a)=>{var l=a(6131);e.exports=function(e,t){return!!(null==e?0:e.length)&&l(e,t,0)>-1}},9302:(e,t,a)=>{var l=a(3488),i=a(6757),n=a(2865);e.exports=function(e,t){return n(i(e,t,l),e+"")}},9325:(e,t,a)=>{var l=a(4840),i="object"==typeof self&&self&&self.Object===Object&&self,n=l||i||Function("return this")();e.exports=n},9344:(e,t,a)=>{var l=a(3805),i=Object.create,n=function(){function e(){}return function(t){if(!l(t))return{};if(i)return i(t);e.prototype=t;var a=new e;return e.prototype=void 0,a}}();e.exports=n},9653:(e,t,a)=>{var l=a(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new l(t).set(new l(e)),t}},9698:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},9884:(e,t,a)=>{var l=a(1791),i=a(7241);e.exports=function(e){return l(e,i(e))}}},t={};function a(l){var i=t[l];if(void 0!==i)return i.exports;var n=t[l]={id:l,loaded:!1,exports:{}};return e[l](n,n.exports,a),n.loaded=!0,n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var l in t)a.o(t,l)&&!a.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e=wp.i18n,t=wp.blocks;var l=a(4058),i=a.n(l);const n=wp.hooks,o=wp.data;var r,s=a(6540);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},c.apply(null,arguments)}const u=e=>s.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),r||(r=s.createElement("path",{d:"M13 18h2c.6 0 1 .4 1 1s-.4 1-1 1H9c-.6 0-1-.4-1-1s.4-1 1-1h2v-2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-7zM4 6v8h16V6z"})));var m;function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},p.apply(null,arguments)}const d=e=>s.createElement("svg",p({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),m||(m=s.createElement("path",{d:"M6 4v15h12V4zm0-2h12c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2"})));var b;function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},g.apply(null,arguments)}const f=e=>s.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 24 24"},e),b||(b=s.createElement("path",{d:"M8 2h8c1.1 0 2 .9 2 2v16c0 1.1-.9 2-2 2H8c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m0 2v15h8V4z"}))),h="desktop",k={desktop:{label:(0,e.__)("Desktop","qi-blocks"),icon:wp.element.createElement(u,null)},tablet:{label:(0,e.__)("Tablet","qi-blocks"),icon:wp.element.createElement(d,null)},mobile:{label:(0,e.__)("Mobile","qi-blocks"),icon:wp.element.createElement(f,null)}};let _=h;const v=()=>_,y=wp.components,w=e=>{const t={...e},{blockAttributeKey:a,blockAttributes:l,setAttributes:i,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterSetAttributes:s,repeaterGetAttributes:c}=t;return t.getAttributeValue=()=>{let e=l[a];return n&&(e=c(r,o)),e||!1},t.setAttributeValue=e=>{n?s(r,e,o):i({[a]:e})},wp.element.createElement("div",{className:"qodef-on-off-option"},wp.element.createElement(y.ToggleControl,{label:t.label,help:t.help,checked:t.getAttributeValue(),onChange:()=>t.setAttributeValue(!t.getAttributeValue())}))};w.defaultProps={label:(0,e.__)("Show","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const A=w,I=[{classSuffix:"desktop",label:(0,e.__)("Hide On Desktop","qi-blocks"),blockAttributeKey:"hideOnDesktop"},{classSuffix:"tablet",label:(0,e.__)("Hide On Tablet","qi-blocks"),blockAttributeKey:"hideOnTablet"},{classSuffix:"mobile",label:(0,e.__)("Hide On Mobile","qi-blocks"),blockAttributeKey:"hideOnMobile"}],S=e=>{const t={...e},{label:a,description:l,blockAttributeKeys:i,blockAttributes:n,setAttributes:o}=t;return wp.element.createElement("div",{className:"qodef-visibility-group-option"},a&&wp.element.createElement("label",{className:"qodef-option-label"},a),l&&wp.element.createElement("p",{className:"qodef-option-description"},l),i.map(e=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(A,{label:e.label,blockAttributeKey:e.blockAttributeKey,blockAttributes:n,setAttributes:o}))))};S.defaultProps={label:(0,e.__)("Visibility","qi-blocks"),description:(0,e.__)("Responsive visibility will take effect only on preview or live page, and not while editing in Gutenberg.","qi-blocks"),blockAttributeKeys:I,blockAttributes:{},setAttributes:()=>{}};const x=()=>({hideOnDesktop:{type:"boolean",default:!1},hideOnTablet:{type:"boolean",default:!1},hideOnMobile:{type:"boolean",default:!1}}),q=e=>{const{attrNameTemplate:t,attrName:a}=e,l=e=>X(t,a,e),i=!le(e,"all")||(e.allowUnitControl??!0),n=le(e,"all")&&e.disableDirections||[];let o={};return["Top","Right","Bottom","Left"].map(e=>{n.includes(e)||(o[l(e)]={type:"number",default:""},o[l(e+"Tablet")]={type:"number",default:""},o[l(e+"Mobile")]={type:"number",default:""},i&&(o[l(`${e}Decimal`)]={type:"number",default:""},o[l(`${e}DecimalTablet`)]={type:"number",default:""},o[l(`${e}DecimalMobile`)]={type:"number",default:""}))}),o[l("Unit")]={type:"string",default:"px"},o[l("UnitTablet")]={type:"string",default:"px"},o[l("UnitMobile")]={type:"string",default:"px"},o};q.defaultProps={attrNameTemplate:"",attrName:"",allowUnitControl:!0};const E=q,T=e=>{const{blockAttributeKey:t}=e,a=!!le(e,"all")&&(e.allowScreens??!1),l=!le(e,"all")||(e.allowUnits??!0),i=le(e,"all")&&e.optionType||"integer",n=le(e,"all")&&e.defaultValue||"",o="decimal"===i?n:"";let r={};return"integer"===i&&(r[t]={type:"number",default:n}),r[X(t,"Unit")]={type:"string",default:"px"},(l||"decimal"===i)&&(r[X(t,"Decimal")]={type:"number",default:o}),a&&(r[X(t,"Tablet")]={type:"number",default:""},r[X(t,"Mobile")]={type:"number",default:""},r[X(t,"UnitTablet")]={type:"string",default:"px"},r[X(t,"UnitMobile")]={type:"string",default:"px"},l&&(r[X(t,"DecimalTablet")]={type:"number",default:""},r[X(t,"DecimalMobile")]={type:"number",default:""})),r};T.defaultProps={allowScreens:!1,allowUnits:!0};const C=T,N=e=>{const t=le(e,"all")&&e.attrNameTemplate||"",a=le(e,"all")&&e.attrName||"Background",l=e=>X(t,a+e),i=C({blockAttributeKey:l("XPosition"),allowScreens:!0}),n=C({blockAttributeKey:l("YPosition"),allowScreens:!0}),o=C({blockAttributeKey:l("SizeWidth"),allowScreens:!0});return{[l("Image")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[l("ImageTablet")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[l("ImageMobile")]:{type:"object",default:{id:null,url:"",alt:"",caption:""}},[l("Position")]:{type:"string",default:""},[l("PositionTablet")]:{type:"string",default:""},[l("PositionMobile")]:{type:"string",default:""},...i,...n,[l("Attachment")]:{type:"string",default:""},[l("Repeat")]:{type:"string",default:""},[l("RepeatTablet")]:{type:"string",default:""},[l("RepeatMobile")]:{type:"string",default:""},[l("Size")]:{type:"string",default:""},[l("SizeTablet")]:{type:"string",default:""},[l("SizeMobile")]:{type:"string",default:""},...o}};N.defaultProps={attrNameTemplate:"",attrName:"Background"};const P=N,O=e=>{const t=le(e,"all")&&e.attrNameTemplate||"",a=e=>X(t,e),l=!!le(e,"all")&&(e.includeVideoBG??!1),i=P({attrNameTemplate:t});let n={[a("BackgroundType")]:{type:"string",default:""},[a("BackgroundColor")]:{type:"string",default:""},...i,[a("BackgroundGradientColor1")]:{type:"string",default:""},[a("BackgroundGradientLocation1")]:{type:"number",default:""},[a("BackgroundGradientColor2")]:{type:"string",default:""},[a("BackgroundGradientLocation2")]:{type:"number",default:""},[a("BackgroundGradientType")]:{type:"string",default:"linear"},[a("BackgroundGradientTypeAngle")]:{type:"number",default:""},[a("BackgroundGradientTypePosition")]:{type:"string",default:"center center"}};if(l){const e={[a("BackgroundVideoLink")]:{type:"object",default:{id:null,url:"",alt:""}},[a("BackgroundVideoStartTime")]:{type:"number",default:""},[a("BackgroundVideoEndTime")]:{type:"number",default:""},[a("BackgroundVideoStartTime")]:{type:"number",default:""},[a("BackgroundVideoPlayOnce")]:{type:"boolean",default:!1},[a("BackgroundVideoPlayOnMobile")]:{type:"boolean",default:!1},[a("BackgroundVideoFallbackImage")]:{type:"object",default:{id:null,url:"",alt:""}}};n={...n,...e}}return n};O.defaultProps={attrNameTemplate:"",includeVideoBG:!1};const B=O,V=e=>{const t=le(e,"all")&&e.attrNameTemplate||"",a=le(e,"all")&&e.attrName||"",l=le(e,"all")&&e.defaultValue||"",i=e=>X(t,a+e);return{[i("")]:{type:"string",default:l},[i("Tablet")]:{type:"string",default:""},[i("Mobile")]:{type:"string",default:""}}};V.defaultProps={attrNameTemplate:"",attrName:"",defaultValue:""};const D=V,R=e=>{const t=le(e,"all")&&e.attrNameTemplate||"",a=le(e,"all")&&e.disableWidthDirections||[],l=!le(e,"all")||(e.allowBorderColor??!0),i=!le(e,"all")||(e.allowBorderRadius??!0),n=e=>X(t,e),o=E({attrNameTemplate:t,attrName:"BorderWidth",disableDirections:a,allowUnitControl:!1}),r=l?{[n("BorderColor")]:{type:"string",default:""}}:{},s=i?E({attrNameTemplate:t,attrName:"BorderRadius"}):{};return{[n("BorderStyle")]:{type:"string",default:""},...r,...o,...s}};R.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0};const L=R,M=e=>{const t=le(e,"all")&&e.attrNameTemplate||"",a=e=>X(t,e);return{[a("BoxShadowColor")]:{type:"string",default:""},[a("BoxShadowHorizontal")]:{type:"number",default:""},[a("BoxShadowVertical")]:{type:"number",default:""},[a("BoxShadowBlur")]:{type:"number",default:""},[a("BoxShadowSpread")]:{type:"number",default:""},[a("BoxShadowPosition")]:{type:"string",default:""}}};M.defaultProps={attrNameTemplate:""};const U=M,z=e=>{const t=le(e,"all")&&e.excludePanels||[],a=le(e,"all")&&e.includePanels||[];let l=a&&a.length?a:j();const i=e=>X("",e);t&&t.length&&t.forEach(e=>{l.splice(l.indexOf(e),1)});let n={};const o=x();if(l.includes("advanced")){const e=E({attrName:i("Margin")}),t=E({attrName:i("Padding")});n={...n,...e,...t,[i("zIndex")]:{type:"number",default:""},[i("cssId")]:{type:"string",default:""},[i("cssClasses")]:{type:"string",default:""}}}if(l.includes("motion-effects")&&(n={...n,[i("EntranceAnimation")]:{type:"string",default:""},[i("EntranceAnimationDuration")]:{type:"string",default:"normal"},[i("EntranceAnimationDelay")]:{type:"number",default:""}}),l.includes("background")){const e=B({attrNameTemplate:"Advanced"});n={...n,...e}}if(l.includes("border")){const e=L({attrNameTemplate:"Advanced"}),t=U({attrNameTemplate:"Advanced"});n={...n,...e,...t}}if(l.includes("positioning")){const e=D({attrName:i("BlockWidth")}),t=C({blockAttributeKey:i("BlockCustomWidth"),allowScreens:!0}),a=C({blockAttributeKey:i("PositionHorizontalOffset"),allowScreens:!0}),l=C({blockAttributeKey:i("PositionVerticalOffset"),allowScreens:!0});n={...n,...e,...t,[i("BlockPosition")]:{type:"string",default:""},[i("PositionHorizontalOrientation")]:{type:"string",default:"left"},...a,[i("PositionVerticalOrientation")]:{type:"string",default:"top"},...l}}return l.includes("responsive")&&(n={...n,...o}),n};z.defaultProps={excludePanels:[],includePanels:[]};const K=z,j=()=>["advanced","motion-effects","background","border","positioning","responsive"],F=(e,t="")=>{const a=e=>X(t,e),l=[];return e[a("cssClasses")]&&l.push(e[a("cssClasses")]),void 0!==e[a("EntranceAnimation")]&&""!==e[a("EntranceAnimation")]&&(l.push("qodef-entrance-animation--on"),e[a("EntranceAnimationDuration")]&&l.push("qodef-animation-speed--"+e[a("EntranceAnimationDuration")])),e[a("BlockWidth")]&&l.push("qodef-width--"+e[a("BlockWidth")]),e[a("BlockWidthTablet")]&&l.push("qodef-width--tablet--"+e[a("BlockWidthTablet")]),e[a("BlockWidthMobile")]&&l.push("qodef-width--mobile--"+e[a("BlockWidthMobile")]),l.push((e=>{const t=[];return I.map(a=>{const l="qodef-hide-on--"+a.classSuffix,i=e[a.blockAttributeKey];t.includes(l)&&!i?t.filter(function(e){return e!==l}):!t.includes(l)&&i&&t.push(l)}),t.join(" ")})(e)),l.join(" ")},W=(e,t="")=>{let a=["qodef-block-container"];return le(e.uniqueClass,"all")&&a.push(e.uniqueClass),a.push(F(e,t)),a.join(" ")},G=(e,t="")=>{let a={};const l=((e,t="")=>{const a=(e,a="")=>X(t,e,a),l={};return void 0!==e[a("EntranceAnimation")]&&""!==e[a("EntranceAnimation")]&&(l["data-animation"]=e[a("EntranceAnimation")]),"custom"!==e[a("BlockWidth")]&&"custom"!==e[a("BlockWidthTablet")]&&"custom"!==e[a("BlockWidthMobile")]||["","Tablet","Mobile"].forEach(t=>{const i=e[a("BlockCustomWidth",t)],n=e[a("BlockCustomWidthDecimal",t)],o=e[a("BlockCustomWidthUnit",t)];ee(o)&&i?l["data-width"+(t?"-"+t.toLowerCase():"")]=parseInt(i,10)+o:te(o)&&n&&(l["data-width"+(t?"-"+t.toLowerCase():"")]=parseFloat(n)+o)}),l})(e,t);return l&&(a={...a,...l}),a},H=(e,t="",a=[])=>Y(e,t,a),$=(e,t,a=[])=>{if(!e)return"";let l=[`qi-block-${e}`,"qodef-block","qodef-m"];return le(t.attributes.className,"all")&&l.push(t.attributes.className),a&&(l=[...l,...a]),l.join(" ")},Y=(e,t="",a=[])=>{const l=e=>X(t,e);if(!e)return"";let i=[];return le(e[l("cssId")],"all")&&i.push(e[l("cssId")]),a&&(i=[...i,...a]),i.join(" ")},X=(t,a,l)=>(t=t||"",a=a||"",l=l||"",i()((0,e.sprintf)("%s%s%s",t,a,l))),Z=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"",J=e=>e&&h!==e?Z(e):"",Q=(e,t)=>{let a=e.desktop;return"mobile"===t&&(a={...a,...e.tablet}),{...a,...e[t]}},ee=e=>["px"].includes(e),te=e=>["em","rem","%","vw","vh"].includes(e),ae=(e,t="integer")=>{let a="";return 0===e||"0"===e?a=0:e&&(a=parseInt(e,10),"decimal"===t&&(a=parseFloat(e))),a},le=(e,t="")=>{let a=void 0!==e&&""!==e;return"all"===t&&(a=void 0!==e&&e),a},ie=e=>{let t="";return 0===e||"0"===e?t=0:e&&(t=e),t},ne=(t,a=!0,l=[])=>{let i=[],o=[];if(t){switch(a&&(i=[{value:"",label:(0,e.__)("Default","qi-blocks")}]),t){case"no_yes":o=[{value:"no",label:(0,e.__)("No","qi-blocks")},{value:"yes",label:(0,e.__)("Yes","qi-blocks")}];break;case"yes_no":o=[{value:"yes",label:(0,e.__)("Yes","qi-blocks")},{value:"no",label:(0,e.__)("No","qi-blocks")}];break;case"link_target":o=[{value:"_self",label:(0,e.__)("Same Window","qi-blocks")},{value:"_blank",label:(0,e.__)("New Window","qi-blocks")}];break;case"column_gap":o=[{value:"huge",label:(0,e.__)("Huge (35)","qi-blocks")},{value:"large",label:(0,e.__)("Large (25)","qi-blocks")},{value:"medium",label:(0,e.__)("Medium (20)","qi-blocks")},{value:"normal",label:(0,e.__)("Normal (15)","qi-blocks")},{value:"small",label:(0,e.__)("Small (10)","qi-blocks")},{value:"tiny",label:(0,e.__)("Tiny (5)","qi-blocks")},{value:"no",label:(0,e.__)("No (0)","qi-blocks")}];break;case"columns_responsive":o=[{value:"predefined",label:(0,e.__)("Predefined","qi-blocks")},{value:"custom",label:(0,e.__)("Custom","qi-blocks")}];break;case"masonry_image_sizes":o=[{value:"square",label:(0,e.__)("Square","qi-blocks")},{value:"landscape",label:(0,e.__)("Landscape","qi-blocks")},{value:"portrait",label:(0,e.__)("Portrait","qi-blocks")},{value:"huge-square",label:(0,e.__)("Huge","qi-blocks")}];break;case"image_sizes":o=[{value:"full",label:(0,e.__)("Original","qi-blocks")},{value:"thumbnail",label:(0,e.__)("Thumbnail","qi-blocks")},{value:"medium",label:(0,e.__)("Medium","qi-blocks")},{value:"large",label:(0,e.__)("Large","qi-blocks")}];break;case"title_tag":o=[{value:"h1",label:(0,e.__)("H1","qi-blocks")},{value:"h2",label:(0,e.__)("H2","qi-blocks")},{value:"h3",label:(0,e.__)("H3","qi-blocks")},{value:"h4",label:(0,e.__)("H4","qi-blocks")},{value:"h5",label:(0,e.__)("H5","qi-blocks")},{value:"h6",label:(0,e.__)("H6","qi-blocks")},{value:"p",label:(0,e.__)("Paragraph","qi-blocks")}];break;case"font_weight":o=[{value:"normal",label:(0,e.__)("Normal","qi-blocks")},{value:"bold",label:(0,e.__)("Bold","qi-blocks")},{value:"100",label:(0,e.__)("Thin (100)","qi-blocks")},{value:"200",label:(0,e.__)("Extra Light (200)","qi-blocks")},{value:"300",label:(0,e.__)("Light (300)","qi-blocks")},{value:"400",label:(0,e.__)("Normal (400)","qi-blocks")},{value:"500",label:(0,e.__)("Medium (500)","qi-blocks")},{value:"600",label:(0,e.__)("Semi Bold (600)","qi-blocks")},{value:"700",label:(0,e.__)("Bold (700)","qi-blocks")},{value:"800",label:(0,e.__)("Extra Bold (800)","qi-blocks")},{value:"900",label:(0,e.__)("Black (900)","qi-blocks")}];break;case"text_transform":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"uppercase",label:(0,e.__)("Uppercase","qi-blocks")},{value:"lowercase",label:(0,e.__)("Lowercase","qi-blocks")},{value:"capitalize",label:(0,e.__)("Capitalize","qi-blocks")},{value:"normal",label:(0,e.__)("Normal","qi-blocks")}];break;case"font_style":o=[{value:"normal",label:(0,e.__)("Normal","qi-blocks")},{value:"italic",label:(0,e.__)("Italic","qi-blocks")},{value:"oblique",label:(0,e.__)("Oblique","qi-blocks")}];break;case"text_decoration":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"underline",label:(0,e.__)("Underline","qi-blocks")},{value:"overline",label:(0,e.__)("Overline","qi-blocks")},{value:"line-through",label:(0,e.__)("Line-Through","qi-blocks")}];break;case"background_position":o=[{value:"center center",label:(0,e.__)("Center Center","qi-blocks")},{value:"center left",label:(0,e.__)("Center Left","qi-blocks")},{value:"center right",label:(0,e.__)("Center Right","qi-blocks")},{value:"top center",label:(0,e.__)("Top Center","qi-blocks")},{value:"top left",label:(0,e.__)("Top Left","qi-blocks")},{value:"top right",label:(0,e.__)("Top Right","qi-blocks")},{value:"bottom center",label:(0,e.__)("Bottom Center","qi-blocks")},{value:"bottom left",label:(0,e.__)("Bottom Left","qi-blocks")},{value:"bottom right",label:(0,e.__)("Bottom Right","qi-blocks")}];break;case"background_attachment":o=[{value:"scroll",label:(0,e.__)("Scroll","qi-blocks")},{value:"fixed",label:(0,e.__)("Fixed","qi-blocks")}];break;case"background_repeat":o=[{value:"no-repeat",label:(0,e.__)("No-repeat","qi-blocks")},{value:"repeat",label:(0,e.__)("Repeat","qi-blocks")},{value:"repeat-x",label:(0,e.__)("Repeat-x","qi-blocks")},{value:"repeat-y",label:(0,e.__)("Repeat-y","qi-blocks")}];break;case"background_size":o=[{value:"auto",label:(0,e.__)("Auto","qi-blocks")},{value:"cover",label:(0,e.__)("Cover","qi-blocks")},{value:"contain",label:(0,e.__)("Contain","qi-blocks")}];break;case"horizontal_alignment":o=[{value:"left",label:(0,e.__)("Left","qi-blocks")},{value:"right",label:(0,e.__)("Right","qi-blocks")},{value:"center",label:(0,e.__)("Center","qi-blocks")}];break;case"vertical_alignment":o=[{value:"top",label:(0,e.__)("Top","qi-blocks")},{value:"middle",label:(0,e.__)("Middle","qi-blocks")},{value:"bottom",label:(0,e.__)("Bottom","qi-blocks")}];break;case"html_tag":o=[{value:"section",label:(0,e.__)("Section","qi-blocks")},{value:"div",label:(0,e.__)("Div","qi-blocks")},{value:"main",label:(0,e.__)("Main","qi-blocks")},{value:"article",label:(0,e.__)("Article","qi-blocks")},{value:"nav",label:(0,e.__)("Nav","qi-blocks")},{value:"footer",label:(0,e.__)("Footer","qi-blocks")},{value:"header",label:(0,e.__)("Header","qi-blocks")},{value:"aside",label:(0,e.__)("Aside","qi-blocks")}];break;case"appear_animation":o=[{value:"none",label:(0,e.__)("None","qi-blocks")},{value:"from-bottom",label:(0,e.__)("From Bottom","qi-blocks")},{value:"from-top",label:(0,e.__)("From Top","qi-blocks")},{value:"from-left",label:(0,e.__)("From Left","qi-blocks")},{value:"from-right",label:(0,e.__)("From Right","qi-blocks")},{value:"fade",label:(0,e.__)("Fade in","qi-blocks")}];break;case"appear_delay":o=[{value:"random",label:(0,e.__)("Random","qi-blocks")},{value:"ms",label:(0,e.__)("Set ms","qi-blocks")}];break;case"responsive_screens":o=[{value:"1024",label:(0,e.__)("Below 1024px","qi-blocks")},{value:"768",label:(0,e.__)("Below 768px","qi-blocks")},{value:"680",label:(0,e.__)("Below 680px","qi-blocks")},{value:"480",label:(0,e.__)("Below 480px","qi-blocks")}];break;case"order_by":o=[{value:"date",label:(0,e.__)("Date","qi-blocks")},{value:"id",label:(0,e.__)("ID","qi-blocks")},{value:"title",label:(0,e.__)("Title","qi-blocks")}];break;case"order":o=[{value:"desc",label:(0,e.__)("Descending","qi-blocks")},{value:"asc",label:(0,e.__)("Ascending","qi-blocks")}];break;case"border_style":o=[{value:"solid",label:(0,e.__)("Solid","qi-blocks")},{value:"dashed",label:(0,e.__)("Dashed","qi-blocks")},{value:"dotted",label:(0,e.__)("Dotted","qi-blocks")}]}i=[...i,...o],l&&(i=[...i,...l])}return(0,n.applyFilters)("qi-blocks-filter-options-pool",i)},oe=(e,t="",a={cssProp:"",value:""})=>{const{attributes:l,blockAttrName:i,cssProp:n}=e,o=le(e,"all")&&void 0!==e.direction&&e.direction?Z(e.direction):"",r=!!le(e,"all")&&(e.customUnitValue??!1);let s={},c={},u={};return Object.entries(k).map(([e])=>{let m=J(e),p="",d=i+o+m,b=i+o+"Decimal"+m,g=l[i+"Unit"+m];(le(l[d])||le(l[b]))&&(ee(g)&&le(l[d])&&!r?p=ae(l[d])+g:te(g)&&le(l[b])&&!r?p=ae(l[b],"decimal")+g:""!==l[d]&&(p=l[d]));const f=e=>{let a=e;if(t.includes("%s")){const l=t.split("%s");a="",l.forEach((t,i)=>{a+=t,i!==l.length-1&&(a+=e)})}return a};if(p)switch(e){case"desktop":s[n]=t?f(p):p,a.cssProp&&a.value&&(s[a.cssProp]=a.value);break;case"tablet":c[n]=t?f(p):p,a.cssProp&&a.value&&(c[a.cssProp]=a.value);break;case"mobile":u[n]=t?f(p):p,a.cssProp&&a.value&&(u[a.cssProp]=a.value)}}),{desktop:s,tablet:c,mobile:u}},re=e=>{const t=le(e,"all")&&e.attrNameTemplate||"",a=e=>X(t,e);return{[a("Image")]:{type:"object",default:{id:null,url:"",alt:"",caption:"",html:""}},[a("ImageTablet")]:{type:"object",default:{id:null,url:"",alt:"",caption:"",html:""}},[a("ImageMobile")]:{type:"object",default:{id:null,url:"",alt:"",caption:"",html:""}},[a("ImageSize")]:{type:"string",default:"full"},[a("ImageSizeTablet")]:{type:"string",default:""},[a("ImageSizeMobile")]:{type:"string",default:""},[a("ImageCustomWidth")]:{type:"number",default:""},[a("ImageCustomWidthTablet")]:{type:"number",default:""},[a("ImageCustomWidthMobile")]:{type:"number",default:""},[a("ImageCustomHeight")]:{type:"number",default:""},[a("ImageCustomHeightTablet")]:{type:"number",default:""},[a("ImageCustomHeightMobile")]:{type:"number",default:""}}};re.defaultProps={attrNameTemplate:""};const se=re({attrNameTemplate:"Main"}),ce=E({attrNameTemplate:"Main",attrName:"Padding"}),ue=U({attrNameTemplate:"Main"}),me=U({attrNameTemplate:"Parallax"}),pe=K(),de={uniqueClass:{type:"string",default:""},...se,mainImageParallaxLevel:{type:"number",default:""},items:{type:"array",default:[{itemImage:{image:{id:null,url:qiBlocksEditor.vars.defaultThumbnail,alt:qiBlocksEditor.vars.defaultImagePlaceholder},imageSize:"full"},itemImagePosition:"top-left",itemImageWidth:{itemImageWidthUnit:"px",itemImageWidthUnitTablet:"px",itemImageWidthUnitMobile:"px"},itemYOffset:{itemYOffsetUnit:"px",itemYOffsetUnitTablet:"px",itemYOffsetUnitMobile:"px"},itemXOffset:{itemXOffsetUnit:"px",itemXOffsetUnitTablet:"px",itemXOffsetUnitMobile:"px"},itemImageZIndex:"",itemImageParallaxLevel:""},{itemImage:{image:{id:null,url:qiBlocksEditor.vars.defaultThumbnail,alt:qiBlocksEditor.vars.defaultImagePlaceholder},imageSize:"full"},itemImagePosition:"bottom-right",itemImageWidth:{itemImageWidthUnit:"px",itemImageWidthUnitTablet:"px",itemImageWidthUnitMobile:"px"},itemYOffset:{itemYOffsetUnit:"px",itemYOffsetUnitTablet:"px",itemYOffsetUnitMobile:"px"},itemXOffset:{itemXOffsetUnit:"px",itemXOffsetUnitTablet:"px",itemXOffsetUnitMobile:"px"},itemImageZIndex:"",itemImageParallaxLevel:""}]},...ce,...ue,...me,...pe};var be=a(2404),ge=a.n(be),fe=a(5364),he=a.n(fe);const ke=wp.blockEditor,_e=wp.compose,ve=wp.element;var ye=a(6942),we=a.n(ye);const Ae=e=>{const{unitType:t,unitValue:a,onChangeUnit:l}=e;if(e.units[t])return wp.element.createElement("ul",{className:"qodef-unit-control"},Object.entries(e.units[t]).map(([e,t],i)=>wp.element.createElement("li",{key:i},wp.element.createElement("a",{className:we()("qodef-unit",{"qodef--selected":("p"===e?"%":e)===a}),onClick:l,"data-unit":"p"===e?"%":e},t))))};Ae.defaultProps={units:{typography:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),rem:(0,e.__)("rem","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},measure:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},space:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),em:(0,e.__)("em","qi-blocks")},height:{px:(0,e.__)("px","qi-blocks"),vw:(0,e.__)("vw","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},xPosition:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},yPosition:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},pxAndPercent:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks")},pxAndEm:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks")},pxEmVw:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},pxPercentVh:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vh:(0,e.__)("vh","qi-blocks")},pxPercentVw:{px:(0,e.__)("px","qi-blocks"),p:(0,e.__)("%","qi-blocks"),vw:(0,e.__)("vw","qi-blocks")},pxEmRem:{px:(0,e.__)("px","qi-blocks"),em:(0,e.__)("em","qi-blocks"),rem:(0,e.__)("rem","qi-blocks")}},unitValue:"",onChangeUnit:()=>{}};const Ie=Ae;class Se extends ve.Component{constructor(){super(...arguments),this.state={screen:h,isScreenPickerOpen:!1,isMouseOver:!1}}onChangeScreen(e,t){const a=this;a.state.isScreenPickerOpen?(a.props.onChangeScreen(e),a.setState({screen:e,isScreenPickerOpen:!1}),_=e,!t&&a.changePreviewScreen(e),(0,n.doAction)("qi-blocks-action-screen-change",e)):t||a.setState({isScreenPickerOpen:!0}),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-screens-option .qodef-screens.qodef--opened");t.length&&!t[0].contains(e.target)&&a.setState({isScreenPickerOpen:!1})})}onOtherScreenChange(e){this.props.onChangeScreen(e),this.setState({screen:e})}componentDidMount(){const{instanceId:e}=this.props;(0,n.addAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`,this.onOtherScreenChange.bind(this))}componentWillUnmount(){const{instanceId:e}=this.props;(0,n.removeAction)("qi-blocks-action-screen-change",`qi-blocks/components/screen-control-${e}`)}changeScreenControls(e){v()!==e.previewScreen&&this.onChangeScreen(e.previewScreen,!0)}changePreviewScreen(e){if(e!==this.props.previewScreen){const t=(0,o.dispatch)("core/edit-post")||"",a=(0,o.dispatch)("core/edit-site")||"";let l;if(t){let{__experimentalSetPreviewDeviceType:e}=t;l=e}if(a){const{__experimentalSetPreviewDeviceType:e}=a;l=e}l&&l(Z(e))}}render(){const e={...this.props},t={...this.state},{label:a,screens:l,isWidgetsArea:i,previewScreen:n}=e;let o=!1;return(l.length<1||i)&&(o=!0),h!==n&&t.screen!==n&&this.onOtherScreenChange(n),this.changeScreenControls(e),wp.element.createElement("div",{className:"qodef-screens-option"},h!==t.screen&&wp.element.createElement("style",null,"\n\t\t\t\t\t\t\t.qodef-screens-option .qodef-screens.qodef--opened {\n\t\t\t\t\t\t\t\ttop: calc(-4px - 22px * "+Object.keys(l).indexOf(t.screen)+");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t"),a&&wp.element.createElement("label",{className:"qodef-option-label"},a),!o&&wp.element.createElement("ul",{className:"qodef-screens "+(t.isScreenPickerOpen?"qodef--opened":"")},Object.entries(l).map(([e,a],i)=>i===Object.keys(l).indexOf(t.screen)||t.isScreenPickerOpen?wp.element.createElement("li",{className:"qodef-screen-item "+(e===t.screen?"qodef--selected":""),key:i},wp.element.createElement(y.Button,{className:"qodef-screen-item-button",onClick:()=>this.onChangeScreen(e),icon:a.icon,showTooltip:!1,label:a.label,"data-screen":e,onMouseEnter:()=>this.setState({isMouseOver:e}),onMouseLeave:()=>this.setState({isMouseOver:!1})}),e===t.isMouseOver&&wp.element.createElement("div",{className:"qodef-screen-item-tooltip"},a.label)):null)))}}Se.defaultProps={label:"",screens:k,isWidgetsArea:!1,previewScreen:"desktop",onChangeScreen:()=>{}};const xe=(0,o.withSelect)(e=>{let t="desktop";return e("core/edit-post")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post").__experimentalGetPreviewDeviceType().toLowerCase()),e("core/edit-site")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{isWidgetsArea:e("core/edit-widgets")&&!e("core/edit-post"),previewScreen:t}})((0,_e.withInstanceId)(Se));class qe extends ve.Component{constructor(){super(...arguments),this.state={screen:v(),linkedInputs:!1}}getScreenLabelSuffix(e){const t=e||this.state.screen;return J(t)}getAttributeValue(e,t=""){const{blockAttributes:a,allowScreens:l,repeater:i,repeaterItemIndex:n,repeaterItemKey:o,repeaterGetAttributes:r}=this.props;let s=e;l&&t&&(s=e+t);let c=a[s];return i&&(c=r({key:o,childKey:s},n)),ie(c)}setAttributeValue(e,t,a=""){const{setAttributes:l,allowScreens:i,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterSetAttributes:s}=this.props;let c=e;i&&a&&(c=e+a),n?s({key:r,childKey:c},t,o):l({[c]:t})}render(){const t={...this.props},{label:a,allowScreens:l,rangeMax:i,rangeMin:n,rangeStep:o,rangeDecimalMax:r,rangeDecimalMin:s,rangeDecimalStep:c,repeater:u}=t,m=e=>X(t.attrNameTemplate,t.attrName,e),p=this.getScreenLabelSuffix(),d=m(),b=m("Unit"+p),g=["Top","Right","Bottom","Left"],f=()=>{const e=this.getAttributeValue(b)||"px";return ee(e)},h="margin"===t.attrName.toLowerCase()||t.allowNegativeValues?-1*(f()?i:r):f()?n:s;return t.onChange=(e,t)=>{f()?this.setAttributeValue(m(t),ae(e),p):this.setAttributeValue(m(`${t}Decimal`),ae(e,"decimal"),p)},t.getValue=e=>{let t;return t=f()?""!==this.getAttributeValue(m(e),p)?parseInt(this.getAttributeValue(m(e),p),10):"":""!==this.getAttributeValue(m(`${e}Decimal`),p)?parseFloat(this.getAttributeValue(m(`${e}Decimal`),p)):"",t},t.getPlaceholderValue=e=>{let t="";return"Tablet"===p?t=f()?""!==this.getAttributeValue(m(e))?parseInt(this.getAttributeValue(m(e)),10):"":""!==this.getAttributeValue(m(`${e}Decimal`))?parseFloat(this.getAttributeValue(m(`${e}Decimal`))):"":"Mobile"===p&&(f()?""!==this.getAttributeValue(m(e),"Tablet")?t=parseInt(this.getAttributeValue(m(e),"Tablet"),10):""!==this.getAttributeValue(m(e))&&(t=parseInt(this.getAttributeValue(m(e)),10)):""!==this.getAttributeValue(m(`${e}Decimal`),"Tablet")?t=parseInt(this.getAttributeValue(m(`${e}Decimal`),"Tablet"),10):""!==this.getAttributeValue(m(`${e}Decimal`))&&(t=parseInt(this.getAttributeValue(m(`${e}Decimal`)),10))),t},t.getRangeValue=()=>{let e="";return[...g].some(a=>{t.disableDirections.includes(a)||(e=t.getValue(a))}),e},t.onRangeChange=e=>{[...g].map(a=>{t.disableDirections.length>0&&t.disableDirections.includes(a)?t.onChange("",a):t.onChange(e,a)})},t.onChangeScreen=e=>{this.setState({screen:e})},t.onLinkInputs=e=>{e.preventDefault(),this.state.linkedInputs||[...g].map(e=>{t.disableDirections.length>0&&t.disableDirections.includes(e)?t.onChange("",e):t.onChange(t.getValue("Top"),e)}),this.setState({linkedInputs:!this.state.linkedInputs})},t.onChangeUnit=e=>{e.preventDefault();const t=u?200:0,a=e.target.getAttribute("data-unit"),l=this.getAttributeValue(b)||"px";this.setAttributeValue(b,a),setTimeout(()=>{a!==l&&[...g].map(e=>{const t=d+e,i=`${t}Decimal`;let n=t+p,o=i+p;"px"!==a&&(n=i+p),"px"===l&&(o=t+p,this.setAttributeValue(o,"")),this.setAttributeValue(n,this.getAttributeValue(o))})},t)},wp.element.createElement(y.BaseControl,{className:"qodef-input-control"},wp.element.createElement("div",{className:"qodef-control-heading"},l?wp.element.createElement("div",{className:"qodef-input-control-screens"},wp.element.createElement(xe,{label:a,onChangeScreen:t.onChangeScreen})):wp.element.createElement("label",{className:"qodef-option-label"},a),t.allowUnitControl&&wp.element.createElement(Ie,{unitType:t.unitType,unitValue:this.getAttributeValue(b),onChangeUnit:t.onChangeUnit}),t.allowLinkedControl&&wp.element.createElement(y.Button,{icon:this.state.linkedInputs?"editor-unlink":"admin-links",onClick:t.onLinkInputs,className:"qodef-link-inputs-button "+(this.state.linkedInputs?"linked":"unlinked")})),this.state.linkedInputs?wp.element.createElement(y.RangeControl,{min:n,max:f()?i:r,step:f()?o:c,onChange:t.onRangeChange,allowReset:!0,value:t.getRangeValue()}):wp.element.createElement("ul",null,[...g].map((a,l)=>wp.element.createElement("li",{className:"qodef-input-control-item",key:l},t.disableDirections.length>0&&t.disableDirections.includes(a)?wp.element.createElement("div",{className:"components-base-control__field"},wp.element.createElement("label",null,(0,e.__)(a,"qi-blocks")),wp.element.createElement("input",{className:"components-text-control__input",type:"text",disabled:!0,value:(0,e.__)("auto","qi-blocks")})):wp.element.createElement(y.TextControl,{type:"number",value:t.getValue(a),placeholder:t.getPlaceholderValue(a),onChange:e=>t.onChange(e,a),label:(0,e.__)(a,"qi-blocks"),min:h,max:f()?i:r,step:f()?o:c})))))}}qe.defaultProps={label:"",attrNameTemplate:"",attrName:"",blockAttributes:{},setAttributes:()=>{},unitType:"space",allowScreens:!0,allowNegativeValues:!1,disableDirections:[],allowUnitControl:!0,allowLinkedControl:!0,rangeMax:600,rangeMin:0,rangeStep:1,rangeDecimalMax:100,rangeDecimalMin:0,rangeDecimalStep:.01,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Ee=qe;class Te extends ve.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(){return J(this.state.screen)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:a,repeater:l,repeaterItemIndex:i,repeaterItemKey:n,repeaterGetAttributes:o}=this.props;let r=e;t&&(r=e+t);let s=a[r];return l&&(s=o({key:n,childKey:r},i)),ie(s)}setAttributeValue(e,t,a=this.getScreenLabelSuffix()){const{setAttributes:l,setCustomEventOnChange:i,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterSetAttributes:s}=this.props;let c=e;a&&(c=e+a),n?s({key:r,childKey:c},t,o):l({[c]:t}),i(t)}render(){const e={...this.props},{label:t,blockAttributeKey:a,selectOptions:l}=e;return e.onChangeScreen=e=>{this.setState({screen:e})},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-select-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},wp.element.createElement(xe,{label:t,onChangeScreen:e.onChangeScreen})),wp.element.createElement(y.SelectControl,{value:this.getAttributeValue(a),options:l,onChange:e=>this.setAttributeValue(a,e)}))}}Te.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},selectOptions:{},setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Ce=Te,Ne=wp.blob,{entries:Pe,setPrototypeOf:Oe,isFrozen:Be,getPrototypeOf:Ve,getOwnPropertyDescriptor:De}=Object;let{freeze:Re,seal:Le,create:Me}=Object,{apply:Ue,construct:ze}="undefined"!=typeof Reflect&&Reflect;Re||(Re=function(e){return e}),Le||(Le=function(e){return e}),Ue||(Ue=function(e,t,a){return e.apply(t,a)}),ze||(ze=function(e,t){return new e(...t)});const Ke=lt(Array.prototype.forEach),je=lt(Array.prototype.lastIndexOf),Fe=lt(Array.prototype.pop),We=lt(Array.prototype.push),Ge=lt(Array.prototype.splice),He=lt(String.prototype.toLowerCase),$e=lt(String.prototype.toString),Ye=lt(String.prototype.match),Xe=lt(String.prototype.replace),Ze=lt(String.prototype.indexOf),Je=lt(String.prototype.trim),Qe=lt(Object.prototype.hasOwnProperty),et=lt(RegExp.prototype.test),tt=(at=TypeError,function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return ze(at,t)});var at;function lt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,l=new Array(a>1?a-1:0),i=1;i<a;i++)l[i-1]=arguments[i];return Ue(e,t,l)}}function it(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:He;Oe&&Oe(e,null);let l=t.length;for(;l--;){let i=t[l];if("string"==typeof i){const e=a(i);e!==i&&(Be(t)||(t[l]=e),i=e)}e[i]=!0}return e}function nt(e){for(let t=0;t<e.length;t++){Qe(e,t)||(e[t]=null)}return e}function ot(e){const t=Me(null);for(const[a,l]of Pe(e)){Qe(e,a)&&(Array.isArray(l)?t[a]=nt(l):l&&"object"==typeof l&&l.constructor===Object?t[a]=ot(l):t[a]=l)}return t}function rt(e,t){for(;null!==e;){const a=De(e,t);if(a){if(a.get)return lt(a.get);if("function"==typeof a.value)return lt(a.value)}e=Ve(e)}return function(){return null}}const st=Re(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ct=Re(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ut=Re(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),mt=Re(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),pt=Re(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),dt=Re(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),bt=Re(["#text"]),gt=Re(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ft=Re(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ht=Re(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),kt=Re(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),_t=Le(/\{\{[\w\W]*|[\w\W]*\}\}/gm),vt=Le(/<%[\w\W]*|[\w\W]*%>/gm),yt=Le(/\$\{[\w\W]*/gm),wt=Le(/^data-[\-\w.\u00B7-\uFFFF]+$/),At=Le(/^aria-[\-\w]+$/),It=Le(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),St=Le(/^(?:\w+script|data):/i),xt=Le(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qt=Le(/^html$/i),Et=Le(/^[a-z][.\w]*(-[.\w]+)+$/i);var Tt=Object.freeze({__proto__:null,ARIA_ATTR:At,ATTR_WHITESPACE:xt,CUSTOM_ELEMENT:Et,DATA_ATTR:wt,DOCTYPE_NAME:qt,ERB_EXPR:vt,IS_ALLOWED_URI:It,IS_SCRIPT_OR_DATA:St,MUSTACHE_EXPR:_t,TMPLIT_EXPR:yt});const Ct=1,Nt=3,Pt=7,Ot=8,Bt=9,Vt=function(){return"undefined"==typeof window?null:window};var Dt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Vt();const a=t=>e(t);if(a.version="3.2.6",a.removed=[],!t||!t.document||t.document.nodeType!==Bt||!t.Element)return a.isSupported=!1,a;let{document:l}=t;const i=l,n=i.currentScript,{DocumentFragment:o,HTMLTemplateElement:r,Node:s,Element:c,NodeFilter:u,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:d,trustedTypes:b}=t,g=c.prototype,f=rt(g,"cloneNode"),h=rt(g,"remove"),k=rt(g,"nextSibling"),_=rt(g,"childNodes"),v=rt(g,"parentNode");if("function"==typeof r){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let y,w="";const{implementation:A,createNodeIterator:I,createDocumentFragment:S,getElementsByTagName:x}=l,{importNode:q}=i;let E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};a.isSupported="function"==typeof Pe&&"function"==typeof v&&A&&void 0!==A.createHTMLDocument;const{MUSTACHE_EXPR:T,ERB_EXPR:C,TMPLIT_EXPR:N,DATA_ATTR:P,ARIA_ATTR:O,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:D}=Tt;let{IS_ALLOWED_URI:R}=Tt,L=null;const M=it({},[...st,...ct,...ut,...pt,...bt]);let U=null;const z=it({},[...gt,...ft,...ht,...kt]);let K=Object.seal(Me(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,F=null,W=!0,G=!0,H=!1,$=!0,Y=!1,X=!0,Z=!1,J=!1,Q=!1,ee=!1,te=!1,ae=!1,le=!0,ie=!1,ne=!0,oe=!1,re={},se=null;const ce=it({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const me=it({},["audio","video","img","source","image","track"]);let pe=null;const de=it({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),be="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml";let he=fe,ke=!1,_e=null;const ve=it({},[be,ge,fe],$e);let ye=it({},["mi","mo","mn","ms","mtext"]),we=it({},["annotation-xml"]);const Ae=it({},["title","style","font","a","script"]);let Ie=null;const Se=["application/xhtml+xml","text/html"];let xe=null,qe=null;const Ee=l.createElement("form"),Te=function(e){return e instanceof RegExp||e instanceof Function},Ce=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!qe||qe!==e){if(e&&"object"==typeof e||(e={}),e=ot(e),Ie=-1===Se.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,xe="application/xhtml+xml"===Ie?$e:He,L=Qe(e,"ALLOWED_TAGS")?it({},e.ALLOWED_TAGS,xe):M,U=Qe(e,"ALLOWED_ATTR")?it({},e.ALLOWED_ATTR,xe):z,_e=Qe(e,"ALLOWED_NAMESPACES")?it({},e.ALLOWED_NAMESPACES,$e):ve,pe=Qe(e,"ADD_URI_SAFE_ATTR")?it(ot(de),e.ADD_URI_SAFE_ATTR,xe):de,ue=Qe(e,"ADD_DATA_URI_TAGS")?it(ot(me),e.ADD_DATA_URI_TAGS,xe):me,se=Qe(e,"FORBID_CONTENTS")?it({},e.FORBID_CONTENTS,xe):ce,j=Qe(e,"FORBID_TAGS")?it({},e.FORBID_TAGS,xe):ot({}),F=Qe(e,"FORBID_ATTR")?it({},e.FORBID_ATTR,xe):ot({}),re=!!Qe(e,"USE_PROFILES")&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,H=e.ALLOW_UNKNOWN_PROTOCOLS||!1,$=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,Z=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ae=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,le=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,ne=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,R=e.ALLOWED_URI_REGEXP||It,he=e.NAMESPACE||fe,ye=e.MATHML_TEXT_INTEGRATION_POINTS||ye,we=e.HTML_INTEGRATION_POINTS||we,K=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&Te(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Te(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(K.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(G=!1),te&&(ee=!0),re&&(L=it({},bt),U=[],!0===re.html&&(it(L,st),it(U,gt)),!0===re.svg&&(it(L,ct),it(U,ft),it(U,kt)),!0===re.svgFilters&&(it(L,ut),it(U,ft),it(U,kt)),!0===re.mathMl&&(it(L,pt),it(U,ht),it(U,kt))),e.ADD_TAGS&&(L===M&&(L=ot(L)),it(L,e.ADD_TAGS,xe)),e.ADD_ATTR&&(U===z&&(U=ot(U)),it(U,e.ADD_ATTR,xe)),e.ADD_URI_SAFE_ATTR&&it(pe,e.ADD_URI_SAFE_ATTR,xe),e.FORBID_CONTENTS&&(se===ce&&(se=ot(se)),it(se,e.FORBID_CONTENTS,xe)),ne&&(L["#text"]=!0),Z&&it(L,["html","head","body"]),L.table&&(it(L,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw tt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw tt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=e.TRUSTED_TYPES_POLICY,w=y.createHTML("")}else void 0===y&&(y=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let a=null;const l="data-tt-policy-suffix";t&&t.hasAttribute(l)&&(a=t.getAttribute(l));const i="dompurify"+(a?"#"+a:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(b,n)),null!==y&&"string"==typeof w&&(w=y.createHTML(""));Re&&Re(e),qe=e}},Ne=it({},[...ct,...ut,...mt]),Oe=it({},[...pt,...dt]),Be=function(e){We(a.removed,{element:e});try{v(e).removeChild(e)}catch(t){h(e)}},Ve=function(e,t){try{We(a.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){We(a.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Be(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,a=null;if(Q)e="<remove></remove>"+e;else{const t=Ye(e,/^[\r\n\t ]+/);a=t&&t[0]}"application/xhtml+xml"===Ie&&he===fe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=y?y.createHTML(e):e;if(he===fe)try{t=(new d).parseFromString(i,Ie)}catch(e){}if(!t||!t.documentElement){t=A.createDocument(he,"template",null);try{t.documentElement.innerHTML=ke?w:i}catch(e){}}const n=t.body||t.documentElement;return e&&a&&n.insertBefore(l.createTextNode(a),n.childNodes[0]||null),he===fe?x.call(t,Z?"html":"body")[0]:Z?t.documentElement:n},Le=function(e){return I.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Ue=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},ze=function(e){return"function"==typeof s&&e instanceof s};function at(e,t,l){Ke(e,e=>{e.call(a,t,l,qe)})}const lt=function(e){let t=null;if(at(E.beforeSanitizeElements,e,null),Ue(e))return Be(e),!0;const l=xe(e.nodeName);if(at(E.uponSanitizeElement,e,{tagName:l,allowedTags:L}),X&&e.hasChildNodes()&&!ze(e.firstElementChild)&&et(/<[/\w!]/g,e.innerHTML)&&et(/<[/\w!]/g,e.textContent))return Be(e),!0;if(e.nodeType===Pt)return Be(e),!0;if(X&&e.nodeType===Ot&&et(/<[/\w]/g,e.data))return Be(e),!0;if(!L[l]||j[l]){if(!j[l]&&_t(l)){if(K.tagNameCheck instanceof RegExp&&et(K.tagNameCheck,l))return!1;if(K.tagNameCheck instanceof Function&&K.tagNameCheck(l))return!1}if(ne&&!se[l]){const t=v(e)||e.parentNode,a=_(e)||e.childNodes;if(a&&t){for(let l=a.length-1;l>=0;--l){const i=f(a[l],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,k(e))}}}return Be(e),!0}return e instanceof c&&!function(e){let t=v(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});const a=He(e.tagName),l=He(t.tagName);return!!_e[e.namespaceURI]&&(e.namespaceURI===ge?t.namespaceURI===fe?"svg"===a:t.namespaceURI===be?"svg"===a&&("annotation-xml"===l||ye[l]):Boolean(Ne[a]):e.namespaceURI===be?t.namespaceURI===fe?"math"===a:t.namespaceURI===ge?"math"===a&&we[l]:Boolean(Oe[a]):e.namespaceURI===fe?!(t.namespaceURI===ge&&!we[l])&&!(t.namespaceURI===be&&!ye[l])&&!Oe[a]&&(Ae[a]||!Ne[a]):!("application/xhtml+xml"!==Ie||!_e[e.namespaceURI]))}(e)?(Be(e),!0):"noscript"!==l&&"noembed"!==l&&"noframes"!==l||!et(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===Nt&&(t=e.textContent,Ke([T,C,N],e=>{t=Xe(t,e," ")}),e.textContent!==t&&(We(a.removed,{element:e.cloneNode()}),e.textContent=t)),at(E.afterSanitizeElements,e,null),!1):(Be(e),!0)},nt=function(e,t,a){if(le&&("id"===t||"name"===t)&&(a in l||a in Ee))return!1;if(G&&!F[t]&&et(P,t));else if(W&&et(O,t));else if(!U[t]||F[t]){if(!(_t(e)&&(K.tagNameCheck instanceof RegExp&&et(K.tagNameCheck,e)||K.tagNameCheck instanceof Function&&K.tagNameCheck(e))&&(K.attributeNameCheck instanceof RegExp&&et(K.attributeNameCheck,t)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(t))||"is"===t&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&et(K.tagNameCheck,a)||K.tagNameCheck instanceof Function&&K.tagNameCheck(a))))return!1}else if(pe[t]);else if(et(R,Xe(a,V,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Ze(a,"data:")||!ue[e]){if(H&&!et(B,Xe(a,V,"")));else if(a)return!1}else;return!0},_t=function(e){return"annotation-xml"!==e&&Ye(e,D)},vt=function(e){at(E.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Ue(e))return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U,forceKeepAttr:void 0};let i=t.length;for(;i--;){const n=t[i],{name:o,namespaceURI:r,value:s}=n,c=xe(o),u=s;let m="value"===o?u:Je(u);if(l.attrName=c,l.attrValue=m,l.keepAttr=!0,l.forceKeepAttr=void 0,at(E.uponSanitizeAttribute,e,l),m=l.attrValue,!ie||"id"!==c&&"name"!==c||(Ve(o,e),m="user-content-"+m),X&&et(/((--!?|])>)|<\/(style|title)/i,m)){Ve(o,e);continue}if(l.forceKeepAttr)continue;if(!l.keepAttr){Ve(o,e);continue}if(!$&&et(/\/>/i,m)){Ve(o,e);continue}Y&&Ke([T,C,N],e=>{m=Xe(m,e," ")});const p=xe(e.nodeName);if(nt(p,c,m)){if(y&&"object"==typeof b&&"function"==typeof b.getAttributeType)if(r);else switch(b.getAttributeType(p,c)){case"TrustedHTML":m=y.createHTML(m);break;case"TrustedScriptURL":m=y.createScriptURL(m)}if(m!==u)try{r?e.setAttributeNS(r,o,m):e.setAttribute(o,m),Ue(e)?Be(e):Fe(a.removed)}catch(t){Ve(o,e)}}else Ve(o,e)}at(E.afterSanitizeAttributes,e,null)},yt=function e(t){let a=null;const l=Le(t);for(at(E.beforeSanitizeShadowDOM,t,null);a=l.nextNode();)at(E.uponSanitizeShadowNode,a,null),lt(a),vt(a),a.content instanceof o&&e(a.content);at(E.afterSanitizeShadowDOM,t,null)};return a.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=null,n=null,r=null,c=null;if(ke=!e,ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ze(e)){if("function"!=typeof e.toString)throw tt("toString is not a function");if("string"!=typeof(e=e.toString()))throw tt("dirty is not a string, aborting")}if(!a.isSupported)return e;if(J||Ce(t),a.removed=[],"string"==typeof e&&(oe=!1),oe){if(e.nodeName){const t=xe(e.nodeName);if(!L[t]||j[t])throw tt("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof s)l=De("\x3c!----\x3e"),n=l.ownerDocument.importNode(e,!0),n.nodeType===Ct&&"BODY"===n.nodeName||"HTML"===n.nodeName?l=n:l.appendChild(n);else{if(!ee&&!Y&&!Z&&-1===e.indexOf("<"))return y&&ae?y.createHTML(e):e;if(l=De(e),!l)return ee?null:ae?w:""}l&&Q&&Be(l.firstChild);const u=Le(oe?e:l);for(;r=u.nextNode();)lt(r),vt(r),r.content instanceof o&&yt(r.content);if(oe)return e;if(ee){if(te)for(c=S.call(l.ownerDocument);l.firstChild;)c.appendChild(l.firstChild);else c=l;return(U.shadowroot||U.shadowrootmode)&&(c=q.call(i,c,!0)),c}let m=Z?l.outerHTML:l.innerHTML;return Z&&L["!doctype"]&&l.ownerDocument&&l.ownerDocument.doctype&&l.ownerDocument.doctype.name&&et(qt,l.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+l.ownerDocument.doctype.name+">\n"+m),Y&&Ke([T,C,N],e=>{m=Xe(m,e," ")}),y&&ae?y.createHTML(m):m},a.setConfig=function(){Ce(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),J=!0},a.clearConfig=function(){qe=null,J=!1},a.isValidAttribute=function(e,t,a){qe||Ce({});const l=xe(e),i=xe(t);return nt(l,i,a)},a.addHook=function(e,t){"function"==typeof t&&We(E[e],t)},a.removeHook=function(e,t){if(void 0!==t){const a=je(E[e],t);return-1===a?void 0:Ge(E[e],a,1)[0]}return Fe(E[e])},a.removeHooks=function(e){E[e]=[]},a.removeAllHooks=function(){E={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},a}();class Rt extends ve.Component{constructor(){super(...arguments),this.state={screen:v(),imageId:"",externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return J(this.state.screen)}getAttributeValue(e=this.getScreenLabelSuffix()){const{blockAttributeKey:t,blockAttributes:a,allowScreens:l,repeater:i,repeaterItemIndex:n,repeaterItemKey:o,isSimpleRepeaterValue:r,repeaterGetAttributes:s}=this.props;let c=t;l&&e&&(c=t+e);let u=a[c];if(i){let a=r?null:t;l&&e&&(a=r?this.state.screen:c),u=s({key:o,childKey:a},n)||{}}return ie(u)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:a,allowScreens:l,repeater:i,repeaterItemIndex:n,repeaterItemKey:o,isSimpleRepeaterValue:r,repeaterSetAttributes:s}=this.props,c=this.getScreenLabelSuffix();let u=t;if(l&&c&&(u=t+c),i){let a=r?null:t;l&&c&&(a=r?this.state.screen:u),s({key:o,childKey:a},e,n)}else a({[u]:e})}componentDidMount(){const{allowScreens:e,allowDefaultImage:t}=this.props,{url:a,id:l,defaultValueIsSet:i}=this.getAttributeValue("");if(a&&!a.includes(qiBlocksEditor.vars.siteURL))this.onSelectURL(a),this.setState({externalImageIsSet:!0});else{l&&(this.setState({imageId:l}),this.updateImageSizeOption(l)),!t||i||a||l||(this.setAttributeValue({id:null,url:qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder,caption:"",width:1200,height:800,custom_image_size:"",html:""}),this.setState({defaultImageIsSet:!0}));const n=[""];e&&(n.push("Tablet"),n.push("Mobile")),n.map(e=>{const{url:t,id:a}=this.getAttributeValue(e);t&&(0,Ne.isBlobURL)(t)&&!a&&this.setAttributeValue({url:"",alt:"",caption:"",width:"",height:"",html:""})})}}setSVGIcon=(e,t,a,l)=>{const i=new XMLHttpRequest;null!=i&&(i.open("GET",t,!0),i.onreadystatechange=()=>{4===i.readyState&&200===i.status&&this.setAttributeValue({id:e,url:t,alt:a,caption:l,html:Dt.sanitize(i.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},i.send())};onSelectImage=({id:e,url:t,alt:a,caption:l,width:i,height:n})=>{t.includes(".svg")?this.setSVGIcon(e,t,a,l):this.setAttributeValue({id:e,url:t,alt:a,caption:l,width:i,height:n}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){const t=setInterval(()=>{(0,o.select)("core").getMedia(e)&&(clearInterval(t),this.forceUpdate())},1e3)}};onSelectURL=e=>{e.includes(".svg")?this.setSVGIcon(null,e,"",""):this.setAttributeValue({id:null,url:e,alt:"",caption:"",width:"",height:"",html:""}),this.setState({externalImageIsSet:!1})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeImage=()=>{this.setAttributeValue({id:null,url:"",alt:"",caption:"",width:"",height:"",html:"",defaultValueIsSet:!!this.props.allowDefaultImage})};onImageSizeChange=e=>{const{customImageSizes:t}=this.props,a=(0,o.select)("core").getMedia(this.state.imageId);if(a){let l=e;t&&t.length>1&&(l=this.getImageURLbySize(e)||a.source_url),"custom"===e&&(l=a.source_url),this.setAttributeValue({id:a.id,url:l,alt:a.alt_text||"",caption:a.caption&&a.caption.raw||"",custom_image_size:e})}};getImageURLbySize(e){const t=this.getAttributeValue();let a="";if(t){const l=(0,o.select)("core").getMedia(t.id);if(!l)return"";const i=l.media_details.sizes;if(i&&0===Object.keys(i).length)this.setState({imageSizeNotExist:!0});else{this.setState({imageSizeNotExist:!1});for(const t in i)if(t.includes("qi_blocks_image_size_"+e.replace("-","_"))){a=i[t].source_url;break}}["","custom"].includes(e)&&this.setState({imageSizeNotExist:!1})}return a}getImageSizes(){const{imageSizes:t,customImageSizes:a}=this.props,l=this.getAttributeValue();let i=[];if(l){const n=(0,o.select)("core").getMedia(l.id);if(!n)return[];const r=n.media_details.sizes;if(r&&0===Object.keys(r).length&&i.push({label:(0,e.__)("Default","qi-blocks"),value:""}),a&&a.length>1)a.map(e=>{i.push({label:e.label,value:e.value})});else for(const e in r){const a=r[e],l=t.find(t=>t.slug===e);l&&i.push({label:l.name,value:a.source_url})}}return i}render(){const t={...this.props},a={...this.state},{label:l,help:i,noticeUI:n,allowedTypes:o,allowScreens:r,allowImageSizes:s}=t,c=this.getAttributeValue(),{id:u,url:m,alt:p,html:d}=c;t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(u)};let b=["qodef-image-option"];return m&&m.includes(".svg")&&b.push("qodef--svg"),wp.element.createElement(y.BaseControl,{className:b.join(" ")},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},r?wp.element.createElement(xe,{label:l,onChangeScreen:t.onChangeScreen}):wp.element.createElement(wp.element.Fragment,null,l&&wp.element.createElement("label",{className:"qodef-option-label"},l))),i&&wp.element.createElement("p",{className:"qodef-option-description"},i),m?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},(0,Ne.isBlobURL)(m)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(ke.MediaUploadCheck,null,wp.element.createElement(ke.MediaUpload,{allowedTypes:o,value:u,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:m,alt:p}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Image","qi-blocks"),onClick:this.removeImage})))}))),a.imageSizeNotExist&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("The Image has no predefined sizes, please set a custom image size.","qi-blocks")),a.externalImageIsSet&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("External image URL is set, please upload your image for this Element.","qi-blocks"))):wp.element.createElement(ke.MediaPlaceholder,{allowedTypes:o,icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:n}),s&&u&&!d&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Size","qi-blocks"),options:this.getImageSizes(),onChange:this.onImageSizeChange,value:void 0!==c.custom_image_size?c.custom_image_size:m})))}}Rt.defaultProps={label:(0,e.__)("Image","qi-blocks"),help:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},allowedTypes:["image"],allowScreens:!1,allowDefaultImage:!1,allowImageSizes:!1,customImageSizes:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!0,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Lt=(0,o.withSelect)(e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes}))((0,y.withNotices)(Rt));class Mt extends ve.Component{constructor(){super(...arguments),this.state={isPickerVisible:!1}}getAttributeValue(){const{defaultColor:e,blockAttributeKey:t,blockAttributes:a,repeater:l,repeaterItemIndex:i,repeaterItemKey:n,isSimpleRepeaterValue:o,repeaterGetAttributes:r}=this.props;let s=a[t];return l&&(s=r({key:n,childKey:o?"":t},i)),s||e}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:a,repeater:l,repeaterItemIndex:i,repeaterItemKey:n,isSimpleRepeaterValue:o,repeaterSetAttributes:r}=this.props;l?r({key:n,childKey:o?"":t},e,i):a({[t]:e})}onChange=e=>{const{r:t,g:a,b:l,a:i}=e.rgb;let n="rgba("+[t,a,l,i].join(",")+")";this.props.setHEXValue&&(n=e.hex),this.setState({colorReset:!0}),this.setAttributeValue(n)};onClick=e=>{e.preventDefault();const t=this;t.setState({isPickerVisible:!this.state.isPickerVisible}),window.addEventListener("click",e=>{const a=document.querySelectorAll(".qodef-color-option.qodef--opened");a.length&&a.forEach(a=>{a.contains(e.target)||t.setState({isPickerVisible:!1})})})};onResetColor=e=>{e.preventDefault(),this.setState({isPickerVisible:!this.state.isPickerVisible}),this.setAttributeValue("")};render(){const{label:t,popup:a}=this.props;return wp.element.createElement(y.BaseControl,{className:"qodef-color-option "+(this.state.isPickerVisible?"qodef--opened":"")},wp.element.createElement("div",{className:"qodef-control-heading"},t&&wp.element.createElement("label",{className:"qodef-option-label"},t),wp.element.createElement(y.Button,{onClick:this.onClick,className:"qodef-color-indicator-button"},wp.element.createElement(y.ColorIndicator,{colorValue:this.getAttributeValue(),className:"qodef-color-indicator"}))),this.state.isPickerVisible&&wp.element.createElement("div",{className:`qodef-color-picker-wrapper ${a&&"qodef--popup"}`},wp.element.createElement(y.ColorPicker,{color:this.getAttributeValue(),onChangeComplete:this.onChange,disableAlpha:this.props.setHEXValue}),wp.element.createElement(y.Button,{onClick:this.onResetColor,isSecondary:!0},(0,e.__)("Reset Color","qi-blocks"))))}}Mt.defaultProps={label:(0,e.__)("Color","qi-blocks"),defaultColor:"#000",setHEXValue:!1,blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},popup:!0,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Ut=Mt;class zt extends ve.Component{getAttributeValue(){const{blockAttributeKey:e,blockAttributes:t,repeater:a,repeaterItemIndex:l,repeaterItemKey:i,repeaterGetAttributes:n}=this.props;let o=t[e];return a&&(o=n({key:i},l)||{}),ie(o)}setAttributeValue(e){const{blockAttributeKey:t,setAttributes:a,repeater:l,repeaterItemIndex:i,repeaterItemKey:n,repeaterSetAttributes:o}=this.props;l?o({key:n},e,i):a({[t]:e})}componentDidMount(){const{url:e,id:t}=this.getAttributeValue();e&&(0,Ne.isBlobURL)(e)&&!t&&this.setAttributeValue({url:"",alt:""})}onSelectVideo=({id:e,url:t,alt:a})=>{this.setAttributeValue({id:e,url:t,alt:a})};onSelectURL=e=>{this.setAttributeValue({id:null,url:e,alt:""})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeVideo=()=>{this.setAttributeValue({id:null,url:"",alt:""})};render(){const t={...this.props},{label:a,description:l,noticeUI:i}=t,{id:n,url:o}=this.getAttributeValue();return wp.element.createElement(y.BaseControl,{className:"qodef-video-option"},a&&wp.element.createElement("label",{className:"qodef-option-label"},a),l&&wp.element.createElement("p",{className:"qodef-option-description"},l),o?wp.element.createElement("div",{className:"qodef-video-option-inner"},(0,Ne.isBlobURL)(o)&&wp.element.createElement("div",{className:"qodef-video-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(ke.MediaUploadCheck,null,wp.element.createElement(ke.MediaUpload,{allowedTypes:["video"],value:n,onSelect:this.onSelectVideo,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("video",{src:o}),wp.element.createElement("div",{className:"qodef-video-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Video","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Video","qi-blocks"),onClick:this.removeVideo})))}))):wp.element.createElement(ke.MediaPlaceholder,{allowedTypes:["video"],icon:"format-video",onSelect:this.onSelectVideo,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:i}))}}zt.defaultProps={label:(0,e.__)("Video","qi-blocks"),description:"",blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const Kt=(0,y.withNotices)(zt),jt=qiBlocksEditor.vars.defaultFontSize,Ft=qiBlocksEditor.vars.defaultLineHeight,Wt=e=>{const{convertorType:t,value:a,attributeKey:l}=e;let i=1;l.includes("FontSize")||l.includes("fontSize")?i=jt:(l.includes("LineHeight")||l.includes("lineHeight"))&&(i=Ft);const n=e=>Math.round(parseInt(e,10)/i*100)/100,o=e=>Math.round(parseInt(e,10)/i*100)/100,r=e=>Math.round(parseFloat(e)/i*100),s=e=>Math.round(100*parseInt(e,10)/window.innerWidth),c=e=>Math.round(100*parseInt(e,10)/window.innerHeight),u=e=>Math.round(parseFloat(e)*i),m=e=>Math.round(parseFloat(e)*i/100),p=e=>Math.round(window.innerWidth*parseInt(e,10)/100),d=e=>Math.round(window.innerHeight*parseInt(e,10)/100);let b="";if(""!==a&&""!==l&&""!==t)switch(t){case"pxToEm":b=n(a);break;case"pxToRem":b=o(a);break;case"pxToP":b=r(a);break;case"pxToVw":b=s(a);break;case"pxToVh":b=c(a);break;case"emToPx":b=u(a);break;case"emToRem":case"remToRem":case"vwToVh":case"vhToVw":b=a;break;case"emToP":case"remToP":b=(e=>100*parseFloat(e))(a);break;case"emToVw":case"remToVw":b=(e=>s(u(e)))(a);break;case"emToVh":case"remToVh":b=(e=>c(u(e)))(a);break;case"remToPx":b=(e=>Math.round(parseFloat(e)*i))(a);break;case"pToPx":b=m(a);break;case"pToEm":case"pToRem":b=(e=>parseFloat(e)/100)(a);break;case"pToVw":b=(e=>s(m(e)))(a);break;case"pToVh":b=(e=>c(m(e)))(a);break;case"vwToPx":b=p(a);break;case"vwToEm":b=(e=>n(p(e)))(a);break;case"vwToRem":b=(e=>o(p(e)))(a);break;case"vwToP":b=(e=>r(p(e)))(a);break;case"vhToPx":b=d(a);break;case"vhToEm":b=(e=>n(d(e)))(a);break;case"vhToRem":b=(e=>o(d(e)))(a);break;case"vhToP":b=(e=>r(d(e)))(a)}return b};Wt.defaultProps={convertorType:"pxToEm"};const Gt=Wt;class Ht extends ve.Component{constructor(){super(...arguments),this.state={screen:v()}}getScreenLabelSuffix(e){const t=e||this.state.screen;return J(t)}getAttributeValue(e,t=""){const{blockAttributes:a,allowScreens:l,repeater:i,repeaterItemIndex:n,repeaterItemKey:o,repeaterGetAttributes:r}=this.props;let s=e;l&&t&&(s=e+t);let c=a[s];return i&&(c=r({key:o,childKey:s},n)),ie(c)}setAttributeValue(e,t,a=this.getScreenLabelSuffix()){const{setAttributes:l,allowScreens:i,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterSetAttributes:s}=this.props;let c=e;i&&a&&(c=e+a),n?s({key:r,childKey:c},t,o):l({[c]:t})}onChangeUnitsValues(e,t,a,l){const i={...this.props},{rangeMax:n,rangeDecimalMax:o,allowUnitsConvertor:r}=i;let s=this.getAttributeValue(t);const c=s;l?(s=parseInt(s,10),s>n&&(s=n)):!l&&s>o&&(s=o),r?["emToRem","remToEm","vwToVh","vhToVw"].includes(a)||(this.setAttributeValue(e,Gt({convertorType:a,value:c,attributeKey:t}),""),this.setAttributeValue(t,"","")):(this.setAttributeValue(e,s,""),this.setAttributeValue(t,"",""))}render(){const e={...this.props},{label:t,unitType:a,blockAttributeKey:l,rangeMax:i,rangeMin:n,rangeStep:o,rangeDecimalMax:r,rangeDecimalMin:s,rangeDecimalStep:c,optionType:u,allowReset:m,allowScreens:p,allowUnits:d,repeater:b,repeaterItemKey:g,isSimpleRepeaterValue:f}=e,h=this.getScreenLabelSuffix();let k=b&&!f?g:l;const _=`${k}Decimal`,v=`${k}Unit`,w=`${k}Tablet`,A=`${_}Tablet`,I=`${v}Tablet`,S=`${k}Mobile`,x=`${_}Mobile`,q=`${v}Mobile`;return e.onChangeScreen=e=>{this.setState({screen:e})},e.onChangeUnit=e=>{e.preventDefault();const t=b?200:0,a=e.target.getAttribute("data-unit"),l=this.getAttributeValue(v,h)||"px";this.setAttributeValue(v,a),setTimeout(()=>{if(a!==l){const e=`${l}To${Z(a)}`;let t=k+h,i=_+h;"px"!==a&&(t=_+h,i=k+h),this.onChangeUnitsValues(t,i,e,"px"===a)}},t)},e.onChange=t=>{this.setAttributeValue(k,t),e.setCustomEventOnChange()},e.onChangeDecimal=t=>{let a=0;"decimal"===u&&void 0===t&&(a=200),setTimeout(()=>{this.setAttributeValue(_,t),e.setCustomEventOnChange()},a)},e.getPlaceholderValue=e=>{let t="";const a=this.getAttributeValue(k),l=this.getAttributeValue(_),i=this.getAttributeValue(w),n=this.getAttributeValue(A);return"Tablet"===h?e&&""===i?t=a:e||""!==n||(t=l):"Mobile"===h&&(e&&""===this.getAttributeValue(S)?t=""!==i?i:a:e||""!==this.getAttributeValue(x)||(t=""!==n?n:l)),t},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-range-option"},wp.element.createElement("div",{className:"qodef-advanced-range-heading"},p?wp.element.createElement(xe,{label:t,onChangeScreen:e.onChangeScreen}):wp.element.createElement("label",{className:"qodef-option-label"},t),d&&wp.element.createElement(Ie,{unitType:a,unitValue:this.getAttributeValue(v,h),onChangeUnit:e.onChangeUnit})),"desktop"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(ee(this.getAttributeValue(v))&&"decimal"!==u||!d&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:n,max:i,step:o,value:this.getAttributeValue(k),onChange:e.onChange,allowReset:m}),(te(this.getAttributeValue(v))||!d&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:r,step:c,value:this.getAttributeValue(_),onChange:e.onChangeDecimal,allowReset:m})),"tablet"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(ee(this.getAttributeValue(I))&&"decimal"!==u||!d&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:n,max:i,step:o,value:this.getAttributeValue(w),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:m}),(te(this.getAttributeValue(I))||!d&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:r,step:c,value:this.getAttributeValue(A),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:m})),"mobile"===this.state.screen&&wp.element.createElement(wp.element.Fragment,null,(ee(this.getAttributeValue(q))&&"decimal"!==u||!d&&"integer"===u)&&wp.element.createElement(y.RangeControl,{min:n,max:i,step:o,value:this.getAttributeValue(S),afterIcon:e.getPlaceholderValue(!0),onChange:e.onChange,allowReset:m}),(te(this.getAttributeValue(q))||!d&&"decimal"===u)&&wp.element.createElement(y.RangeControl,{min:s,max:r,step:c,value:this.getAttributeValue(x),afterIcon:e.getPlaceholderValue(!1),onChange:e.onChangeDecimal,allowReset:m})))}}Ht.defaultProps={label:(0,e.__)("Default Label Text","qi-blocks"),unitType:"typography",blockAttributes:{},blockAttributeKey:"",setAttributes:()=>{},rangeMax:300,rangeMin:0,rangeStep:1,rangeDecimalMax:10,rangeDecimalMin:0,rangeDecimalStep:.01,optionType:"integer",allowReset:!0,screens:k,allowScreens:!1,allowUnits:!0,allowUnitsConvertor:!1,setCustomEventOnChange:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",isSimpleRepeaterValue:!1,repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const $t=Ht,Yt=t=>{const a={...t},{attrNameTemplate:l,attrName:i,blockAttributes:n,setAttributes:o,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m,previewScreen:p}=a,d=i||"Background",b=e=>X(l,d+e);a.getAttributeValue=(e,t="")=>{let a=e;t&&(a=e+t);let l=n[a];return r&&(l=m({key:c,childKey:a},s)),ie(l)},a.setAttributeValue=(e,t,a="")=>{let l=e;a&&(l=e+a),r?u({key:c,childKey:l},t,s):o({[l]:t})};let g=J(p||v());return wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Lt,{label:(0,e.__)(`${d} Image`,"qi-blocks"),blockAttributeKey:b("Image"),blockAttributes:n,setAttributes:o,allowScreens:!0,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,isSimpleRepeaterValue:!1,repeaterSetAttributes:u,repeaterGetAttributes:m}),a.getAttributeValue(b("Image"))&&a.getAttributeValue(b("Image")).url&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ce,{label:(0,e.__)(`${d} Position`,"qi-blocks"),blockAttributeKey:b("Position"),blockAttributes:n,setAttributes:o,selectOptions:ne("background_position",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),(""===g&&"custom"===a.getAttributeValue(b("Position"))||""!==g&&"custom"===a.getAttributeValue(b("Position"),g)||""!==g&&"custom"===a.getAttributeValue(b("Position"))&&["","custom"].includes(a.getAttributeValue(b("Position"),"Tablet"))&&""===a.getAttributeValue(b("Position"),g))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement($t,{label:(0,e.__)("X Position","qi-blocks"),blockAttributeKey:b("XPosition"),setAttributes:o,blockAttributes:n,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"xPosition",allowScreens:!0,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement($t,{label:(0,e.__)("Y Position","qi-blocks"),blockAttributeKey:b("YPosition"),setAttributes:o,blockAttributes:n,rangeMax:800,rangeMin:-800,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"yPosition",allowScreens:!0,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m})),wp.element.createElement(y.SelectControl,{label:(0,e.__)(`${d} Attachment`,"qi-blocks"),value:a.getAttributeValue(b("Attachment")),options:ne("background_attachment")||"",onChange:e=>a.setAttributeValue(b("Attachment"),e)}),wp.element.createElement(Ce,{label:(0,e.__)(`${d} Repeat`,"qi-blocks"),blockAttributeKey:b("Repeat"),blockAttributes:n,setAttributes:o,selectOptions:ne("background_repeat"),repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(Ce,{label:(0,e.__)(`${d} Size`,"qi-blocks"),blockAttributeKey:b("Size"),blockAttributes:n,setAttributes:o,selectOptions:ne("background_size",!0,[{value:"custom",label:(0,e.__)("Custom","qi-blocks")}]),repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),"custom"===a.getAttributeValue(b("Size"),g)&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement($t,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:b("SizeWidth"),setAttributes:o,blockAttributes:n,rangeMax:1e3,rangeMin:0,rangeDecimalMax:100,rangeDecimalMin:0,unitType:"xPosition",allowScreens:!0,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}))))};Yt.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{},setAttributes:()=>{},repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const Xt=Yt,Zt=t=>{const a={...t},{attrNameTemplate:l,blockAttributes:i,setAttributes:n,includeVideoBG:o,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m,previewScreen:p}=a,d=e=>X(l,e);a.getAttributeValue=(e,t="")=>{let a=i[e];if(r){let l=e;t&&(l=e+t),a=m({key:c,childKey:l},s)}return ie(a)},a.setAttributeValue=(e,t,a="")=>{if(r){let l=e;a&&(l=e+a),u({key:c,childKey:l},t,s)}else n({[e+a]:t})};const b=[{label:(0,e.__)("Classic","qi-blocks"),value:""},{label:(0,e.__)("Gradient","qi-blocks"),value:"gradient"}];return o&&b.push({label:(0,e.__)("Video","qi-blocks"),value:"video"}),wp.element.createElement("div",{className:"qodef-background-panel"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Background Type","qi-blocks"),value:a.getAttributeValue(d("BackgroundType")),options:b,onChange:e=>a.setAttributeValue(d("BackgroundType"),e)}),""===a.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ut,{label:(0,e.__)("Background Color","qi-blocks"),blockAttributeKey:d("BackgroundColor"),blockAttributes:i,setAttributes:n,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(Xt,{attrNameTemplate:l,blockAttributes:i,setAttributes:n,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m,previewScreen:p})),"gradient"===a.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ut,{label:(0,e.__)("First Color","qi-blocks"),blockAttributeKey:d("BackgroundGradientColor1"),blockAttributes:i,setAttributes:n,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:a.getAttributeValue(d("BackgroundGradientLocation1")),onChange:e=>a.setAttributeValue(d("BackgroundGradientLocation1"),e),min:0,max:100,step:1}),wp.element.createElement(Ut,{label:(0,e.__)("Second Color","qi-blocks"),blockAttributeKey:d("BackgroundGradientColor2"),blockAttributes:i,setAttributes:n,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Location","qi-blocks"),value:a.getAttributeValue(d("BackgroundGradientLocation2")),onChange:e=>a.setAttributeValue(d("BackgroundGradientLocation2"),e),min:0,max:100,step:1}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Gradient Type","qi-blocks"),value:a.getAttributeValue(d("BackgroundGradientType")),options:[{label:(0,e.__)("Linear","qi-blocks"),value:"linear"},{label:(0,e.__)("Radial","qi-blocks"),value:"radial"}],onChange:e=>a.setAttributeValue(d("BackgroundGradientType"),e)}),"linear"===a.getAttributeValue(d("BackgroundGradientType"))&&wp.element.createElement(y.RangeControl,{label:(0,e.__)("Angle","qi-blocks"),value:a.getAttributeValue(d("BackgroundGradientTypeAngle")),onChange:e=>a.setAttributeValue(d("BackgroundGradientTypeAngle"),e),min:0,max:360,step:1}),"radial"===a.getAttributeValue(d("BackgroundGradientType"))&&wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:a.getAttributeValue(d("BackgroundGradientTypePosition")),options:ne("background_position",!1),onChange:e=>a.setAttributeValue(d("BackgroundGradientTypePosition"),e)})),"video"===a.getAttributeValue(d("BackgroundType"))&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Kt,{label:(0,e.__)("Video Link","qi-blocks"),description:(0,e.__)("Self hosted video file (mp4 is recommended)","qi-blocks"),blockAttributeKey:d("BackgroundVideoLink"),blockAttributes:i,setAttributes:n,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Start Time","qi-blocks"),help:(0,e.__)("Specify a start time (in seconds)","qi-blocks"),value:a.getAttributeValue(d("BackgroundVideoStartTime")),onChange:e=>a.setAttributeValue(d("BackgroundVideoStartTime"),ae(e))}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("End Time","qi-blocks"),help:(0,e.__)("Specify an end time (in seconds)","qi-blocks"),value:a.getAttributeValue(d("BackgroundVideoEndTime")),onChange:e=>a.setAttributeValue(d("BackgroundVideoEndTime"),ae(e))}),wp.element.createElement(A,{label:(0,e.__)("Play Once","qi-blocks"),blockAttributeKey:d("BackgroundVideoPlayOnce"),blockAttributes:i,setAttributes:n,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(A,{label:(0,e.__)("Play On Mobile","qi-blocks"),blockAttributeKey:d("BackgroundVideoPlayOnMobile"),blockAttributes:i,setAttributes:n,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),wp.element.createElement(Lt,{label:(0,e.__)("Background Fallback","qi-blocks"),blockAttributeKey:d("BackgroundVideoFallbackImage"),blockAttributes:i,setAttributes:n,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m})))};Zt.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},includeVideoBG:!1,repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{},previewScreen:""};const Jt=Zt,Qt=t=>{const a={...t},{attrNameTemplate:l,blockAttributes:i,setAttributes:n,disableWidthDirections:o,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}=a,p=e=>X(l,e);return a.getAttributeValue=(e,t="")=>{let a=i[e];if(r){let l=e;t&&(l=e+t),a=m({key:c,childKey:l},s)}return ie(a)},a.setAttributeValue=(e,t,a="")=>{if(r){let l=e;a&&(l=e+a),u({key:c,childKey:l},t,s)}else n({[e+a]:t})},wp.element.createElement("div",{className:"qodef-border-panel"},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Border Type","qi-blocks"),value:a.getAttributeValue(p("BorderStyle")),options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("None","qi-blocks"),value:"none"},{label:(0,e.__)("Double","qi-blocks"),value:"double"},{label:(0,e.__)("Groove","qi-blocks"),value:"groove"},...ne("border_style",!1)],onChange:e=>a.setAttributeValue(p("BorderStyle"),e)}),!["","none"].includes(i[p("BorderStyle")])&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(Ee,{label:(0,e.__)("Border Width","qi-blocks"),attrName:p("BorderWidth"),blockAttributes:i,setAttributes:n,allowUnitControl:!1,disableDirections:o,rangeMax:20,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}),(a.allowBorderColor??!0)&&wp.element.createElement(Ut,{label:(0,e.__)("Border Color","qi-blocks"),blockAttributeKey:p("BorderColor"),blockAttributes:i,setAttributes:n,repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m})),(a.allowBorderRadius??!0)&&wp.element.createElement(Ee,{label:(0,e.__)("Border Radius","qi-blocks"),attrName:p("BorderRadius"),blockAttributes:i,setAttributes:n,unitType:"pxAndPercent",repeater:r,repeaterItemIndex:s,repeaterItemKey:c,repeaterSetAttributes:u,repeaterGetAttributes:m}))};Qt.defaultProps={attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowBorderColor:!0,allowBorderRadius:!0,disableWidthDirections:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const ea=Qt,ta=t=>{const a={...t},{attrNameTemplate:l,blockAttributes:i,setAttributes:n,excludeOptions:o}=a,r=e=>X(l,e),[s,c]=(0,ve.useState)(!1);let u=["qodef-box-shadow-panel"];return a.popup&&u.push("qodef--has-popup"),s&&u.push("qodef--opened"),a.onClick=()=>{c(e=>!e),window.addEventListener("click",e=>{const t=document.querySelectorAll(".qodef-box-shadow-panel.qodef--opened");t.length&&t.forEach(t=>{t.contains(e.target)||c(!1)})})},wp.element.createElement("div",{className:u.join(" ")},wp.element.createElement("div",{className:"qodef-box-shadow-panel-heading"},a.label&&wp.element.createElement("label",{className:"qodef-option-label"},a.label),a.popup&&wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Open Panel","qi-blocks"),onClick:a.onClick})),wp.element.createElement("div",{className:"qodef-box-shadow-panel-content"},wp.element.createElement(Ut,{label:(0,e.__)("Color","qi-blocks"),blockAttributeKey:r("BoxShadowColor"),blockAttributes:i,setAttributes:n,popup:!1}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Horizontal","qi-blocks"),value:i[r("BoxShadowHorizontal")],onChange:e=>n({[r("BoxShadowHorizontal")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Vertical","qi-blocks"),value:i[r("BoxShadowVertical")],onChange:e=>n({[r("BoxShadowVertical")]:e}),min:-100,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Blur","qi-blocks"),value:i[r("BoxShadowBlur")],onChange:e=>n({[r("BoxShadowBlur")]:e}),min:0,max:100,step:1,allowReset:!0}),wp.element.createElement(y.RangeControl,{label:(0,e.__)("Spread","qi-blocks"),value:i[r("BoxShadowSpread")],onChange:e=>n({[r("BoxShadowSpread")]:e}),min:-100,max:100,step:1,allowReset:!0}),(m="position",!(o&&o.length&&o.includes(m))&&wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:i[r("BoxShadowPosition")],options:[{label:(0,e.__)("Outline","qi-blocks"),value:""},{label:(0,e.__)("Inset","qi-blocks"),value:"inset"}],onChange:e=>n({[r("BoxShadowPosition")]:e})}))));var m};ta.defaultProps={label:(0,e.__)("Box Shadow","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},excludeOptions:[],popup:!1};const aa=ta;class la extends ve.Component{render(){const{blockAttributes:t,setAttributes:a,excludePanels:l,previewScreen:i,blockName:n}=this.props,o=(e,t="")=>X("",e,t),r=j();l&&l.length&&l.forEach(e=>{r.splice(r.indexOf(e),1)});let s=J(i);return wp.element.createElement("div",{className:"qodef-advanced-panel"},r.includes("advanced")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Advanced","qi-blocks")},wp.element.createElement(Ee,{label:(0,e.__)("Margin","qi-blocks"),attrName:o("Margin"),blockAttributes:t,setAttributes:a}),wp.element.createElement(Ee,{label:(0,e.__)("Padding","qi-blocks"),attrName:o("Padding"),blockAttributes:t,setAttributes:a}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Z-Index","qi-blocks"),value:t[o("zIndex")],onChange:e=>a({[o("zIndex")]:ae(e)})}),wp.element.createElement(y.TextControl,{label:(0,e.__)("CSS ID","qi-blocks"),value:t[o("cssId")],onChange:e=>a({[o("cssId")]:e})}),wp.element.createElement(y.TextControl,{label:(0,e.__)("CSS Classes","qi-blocks"),value:t[o("cssClasses")],onChange:e=>a({[o("cssClasses")]:e})})),r.includes("motion-effects")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Motion Effects","qi-blocks"),initialOpen:!1},wp.element.createElement(y.SelectControl,{label:(0,e.__)("Entrance Animation","qi-blocks"),value:t[o("EntranceAnimation")],options:[{label:(0,e.__)("None","qi-blocks"),value:""},{label:(0,e.__)("Back In Down","qi-blocks"),value:"backInDown"},{label:(0,e.__)("Back In Left","qi-blocks"),value:"backInLeft"},{label:(0,e.__)("Back In Right","qi-blocks"),value:"backInRight"},{label:(0,e.__)("Back In Up","qi-blocks"),value:"backInUp"},{label:(0,e.__)("Bounce","qi-blocks"),value:"bounce"},{label:(0,e.__)("Bounce In","qi-blocks"),value:"bounceIn"},{label:(0,e.__)("Bounce In Down","qi-blocks"),value:"bounceInDown"},{label:(0,e.__)("Bounce In Left","qi-blocks"),value:"bounceInLeft"},{label:(0,e.__)("Bounce In Right","qi-blocks"),value:"bounceInRight"},{label:(0,e.__)("Bounce In Up","qi-blocks"),value:"bounceInUp"},{label:(0,e.__)("Fade In","qi-blocks"),value:"fadeIn"},{label:(0,e.__)("Fade In Down","qi-blocks"),value:"fadeInDown"},{label:(0,e.__)("Fade In Down Big","qi-blocks"),value:"fadeInDownBig"},{label:(0,e.__)("Fade In Left","qi-blocks"),value:"fadeInLeft"},{label:(0,e.__)("Fade In Left Big","qi-blocks"),value:"fadeInLeftBig"},{label:(0,e.__)("Fade In Right","qi-blocks"),value:"fadeInRight"},{label:(0,e.__)("Fade In Right Big","qi-blocks"),value:"fadeInRightBig"},{label:(0,e.__)("Fade In Up","qi-blocks"),value:"fadeInUp"},{label:(0,e.__)("Fade In Up Big","qi-blocks"),value:"fadeInUpBig"},{label:(0,e.__)("Fade In Top Left","qi-blocks"),value:"fadeInTopLeft"},{label:(0,e.__)("Fade In Top Right","qi-blocks"),value:"fadeInTopRight"},{label:(0,e.__)("Fade In Bottom Left","qi-blocks"),value:"fadeInBottomLeft"},{label:(0,e.__)("Fade In Bottom Right","qi-blocks"),value:"fadeInBottomRight"},{label:(0,e.__)("Flash","qi-blocks"),value:"flash"},{label:(0,e.__)("Flip","qi-blocks"),value:"flip"},{label:(0,e.__)("Flip In X","qi-blocks"),value:"flipInX"},{label:(0,e.__)("Flip In Y","qi-blocks"),value:"flipInY"},{label:(0,e.__)("Head Shake","qi-blocks"),value:"headShake"},{label:(0,e.__)("Heart Beat","qi-blocks"),value:"heartBeat"},{label:(0,e.__)("Jack In The Box","qi-blocks"),value:"jackInTheBox"},{label:(0,e.__)("Jello","qi-blocks"),value:"jello"},{label:(0,e.__)("Light Speed In Right","qi-blocks"),value:"lightSpeedInRight"},{label:(0,e.__)("Light Speed In Left","qi-blocks"),value:"lightSpeedInLeft"},{label:(0,e.__)("Pulse","qi-blocks"),value:"pulse"},{label:(0,e.__)("Roll In","qi-blocks"),value:"rollIn"},{label:(0,e.__)("Rotate In","qi-blocks"),value:"rotateIn"},{label:(0,e.__)("Rotate In Down Left","qi-blocks"),value:"rotateInDownLeft"},{label:(0,e.__)("Rotate In Down Right","qi-blocks"),value:"rotateInDownRight"},{label:(0,e.__)("Rotate In Up Left","qi-blocks"),value:"rotateInUpLeft"},{label:(0,e.__)("Rotate In Up Right","qi-blocks"),value:"rotateInUpRight"},{label:(0,e.__)("Rubber Band","qi-blocks"),value:"rubberBand"},{label:(0,e.__)("Shake X","qi-blocks"),value:"shakeX"},{label:(0,e.__)("Shake Y","qi-blocks"),value:"shakeY"},{label:(0,e.__)("Slide In Down","qi-blocks"),value:"slideInDown"},{label:(0,e.__)("Slide In Left","qi-blocks"),value:"slideInLeft"},{label:(0,e.__)("Slide In Right","qi-blocks"),value:"slideInRight"},{label:(0,e.__)("Slide In Up","qi-blocks"),value:"slideInUp"},{label:(0,e.__)("Swing","qi-blocks"),value:"swing"},{label:(0,e.__)("Tada","qi-blocks"),value:"tada"},{label:(0,e.__)("Wobble","qi-blocks"),value:"wobble"},{label:(0,e.__)("Zoom In","qi-blocks"),value:"zoomIn"},{label:(0,e.__)("Zoom In Down","qi-blocks"),value:"zoomInDown"},{label:(0,e.__)("Zoom In Left","qi-blocks"),value:"zoomInLeft"},{label:(0,e.__)("Zoom In Right","qi-blocks"),value:"zoomInRight"},{label:(0,e.__)("Zoom In Up","qi-blocks"),value:"zoomInUp"}],onChange:e=>{a({[o("EntranceAnimation")]:e}),setTimeout(()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)},300)}}),void 0!==t[o("EntranceAnimation")]&&""!==t[o("EntranceAnimation")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(y.SelectControl,{label:(0,e.__)("Animation Duration","qi-blocks"),value:t[o("EntranceAnimationDuration")],options:[{label:(0,e.__)("Slower","qi-blocks"),value:"slower"},{label:(0,e.__)("Slow","qi-blocks"),value:"slow"},{label:(0,e.__)("Normal","qi-blocks"),value:"normal"},{label:(0,e.__)("Fast","qi-blocks"),value:"fast"},{label:(0,e.__)("Faster","qi-blocks"),value:"faster"}],onChange:e=>{a({[o("EntranceAnimationDuration")]:e}),setTimeout(()=>{qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass)},300)}}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Animation Delay (ms)","qi-blocks"),value:t[o("EntranceAnimationDelay")],min:0,step:100,onChange:e=>{a({[o("EntranceAnimationDelay")]:ae(e)}),qiBlocksEditor.qodefTriggerBlockAnimation.triggerAnimation(t.uniqueClass,!0)}}))),r.includes("background")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Background","qi-blocks"),initialOpen:!1},wp.element.createElement(Jt,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:a,previewScreen:i})),r.includes("border")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Border","qi-blocks"),initialOpen:!1},wp.element.createElement(ea,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:a}),wp.element.createElement(aa,{attrNameTemplate:"Advanced",blockAttributes:t,setAttributes:a,popup:!0})),r.includes("positioning")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Positioning","qi-blocks"),initialOpen:!1},wp.element.createElement(Ce,{label:(0,e.__)("Width","qi-blocks"),blockAttributeKey:o("BlockWidth"),blockAttributes:t,setAttributes:a,selectOptions:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Full Width (100%)","qi-blocks"),value:"full-width"},{label:(0,e.__)("Inline (auto)","qi-blocks"),value:"inline"},{label:(0,e.__)("Custom","qi-blocks"),value:"custom"}]}),(""===s&&"custom"===t[o("BlockWidth")]||""!==s&&"custom"===t[o("BlockWidth",s)]||""!==s&&"custom"===t[o("BlockWidth")]&&["","custom"].includes(t[o("BlockWidth","Tablet")])&&""===t[o("BlockWidth",s)])&&wp.element.createElement($t,{label:(0,e.__)("Custom Width","qi-blocks"),blockAttributeKey:o("BlockCustomWidth"),setAttributes:a,blockAttributes:t,rangeMax:1e3,rangeDecimalMax:100,unitType:"pxPercentVw",allowScreens:!0}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Position","qi-blocks"),value:t[o("BlockPosition")],options:[{label:(0,e.__)("Default","qi-blocks"),value:""},{label:(0,e.__)("Absolute","qi-blocks"),value:"absolute"},{label:(0,e.__)("Relative","qi-blocks"),value:"relative"},{label:(0,e.__)("Fixed","qi-blocks"),value:"fixed"}],onChange:e=>{a({[o("BlockPosition")]:e})}}),""!==t[o("BlockPosition")]&&wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(y.SelectControl,{label:(0,e.__)("Horizontal Orientation","qi-blocks"),value:t[o("PositionHorizontalOrientation")],options:[{label:(0,e.__)("Left","qi-blocks"),value:"left"},{label:(0,e.__)("Right","qi-blocks"),value:"right"}],onChange:e=>a({[o("PositionHorizontalOrientation")]:e})}),wp.element.createElement($t,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:o("PositionHorizontalOffset"),setAttributes:a,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}),wp.element.createElement(y.SelectControl,{label:(0,e.__)("Vertical Orientation","qi-blocks"),value:t[o("PositionVerticalOrientation")],options:[{label:(0,e.__)("Top","qi-blocks"),value:"Top"},{label:(0,e.__)("Bottom","qi-blocks"),value:"bottom"}],onChange:e=>a({[o("PositionVerticalOrientation")]:e})}),wp.element.createElement($t,{label:(0,e.__)("Offset","qi-blocks"),blockAttributeKey:o("PositionVerticalOffset"),setAttributes:a,blockAttributes:t,rangeMax:1e3,rangeMin:-1e3,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"measure",allowScreens:!0}))),r.includes("responsive")&&wp.element.createElement(y.PanelBody,{title:(0,e.__)("Responsive","qi-blocks"),initialOpen:!1},wp.element.createElement(S,{blockAttributes:t,setAttributes:a})),qiBlocksEditor.vars?.advancedBlockPanel&&wp.element.createElement(wp.element.Fragment,null,Object.entries(qiBlocksEditor.vars.advancedBlockPanel).map(([t,a],l)=>{let i="";if("help"===t?i=(0,e.__)("Help","qi-blocks"):"features"===t&&(i=(0,e.__)("Get more features","qi-blocks")),a.length<=0||"blocks"===t)return"";const o="help"===t,r=n?n.replace("qi-blocks/",""):"",s=a.map((a,l)=>{let i=a?.link;if(0===l&&"help"===t&&r){const e=qiBlocksEditor.vars.advancedBlockPanel?.blocks[r]||"";e&&e?.demo&&(i=e?.demo+"?utm_source=dash&utm_medium=qiblocks&utm_campaign=blocks")}return wp.element.createElement("div",{className:"qodef-m-item"},a?.image?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("a",{className:"qodef-m-item-image-link",href:a?.link,target:"_blank",rel:"noreferrer"},wp.element.createElement("img",{className:"qodef-m-item-image",src:a.image,alt:a?.title})),wp.element.createElement("p",{className:"qodef-m-item-title"},a?.title),wp.element.createElement("a",{className:"qodef-m-item-button",href:a?.link,target:"_blank",rel:"noreferrer"},(0,e.__)("Upgrade","qi-blocks"))):wp.element.createElement("a",{className:"qodef-m-item-link",href:i,target:"_blank",rel:"noreferrer"},a?.title))});return wp.element.createElement(y.PanelBody,{title:i,className:`qodef-advanced-block-panel-features ${"qodef--"+t} qodef-m`,key:l,initialOpen:o},s)})))}}la.defaultProps={blockAttributes:{},setAttributes:()=>{},excludePanels:[],previewScreen:"desktop",blockName:""};const ia=(0,o.withSelect)(e=>{let t="desktop";return e("core/edit-post")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post")?.__experimentalGetPreviewDeviceType()?.toLowerCase()),e("core/edit-site")&&(t="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:t,blockName:e("core/block-editor")?.getSelectedBlock()?.name}})(la);const na=jQuery;var oa=a.n(na);const ra={init:function(){this.holder=oa()(".qodef-repeater-option .qodef-repeater-items"),this.holder.length&&this.holder.each(function(){ra.initItem(oa()(this))})},initItem:function(e){e&&e.find(".qodef-repeater-item-heading").off().on("click touchstart",function(e){const t=oa()(this),a=t.parents(".qodef-repeater-item");e.target.classList.contains("qodef-repeater-button")||e.target.classList.contains("dashicon")||(a.hasClass("qodef--active")?(a.removeClass("qodef--active"),t.siblings(".qodef-repeater-item-options").slideUp()):(t.siblings(".qodef-repeater-item-options").slideDown(),a.addClass("qodef--active"),a.siblings().removeClass("qodef--active"),a.siblings().find(".qodef-repeater-item-options").slideUp()))})}},sa=ra;function ca(){return ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},ca.apply(null,arguments)}class ua extends ve.Component{constructor(){super(...arguments),this.state={addedItemIndex:""},this.handleAddItem.bind(this),this.handleOnChange.bind(this),this.handleOnRemove.bind(this),this.handleDuplicateItem.bind(this)}componentDidMount(){this.initControlScript()}initControlScript(){setTimeout(()=>{"object"==typeof sa&&sa.init()},600)}getItems=()=>{const{blockAttributeKey:e,blockAttributes:t}=this.props,a=t[e];return le(this.props,"all")&&a.length?JSON.parse(JSON.stringify(a)):[]};handleAddItem=()=>{const{options:e,blockAttributeKey:t,setAttributes:a}=this.props,l=this.getItems();let i={};e.map(e=>{i[e.optionKey]=e.optionDefaultValue||""}),l.push(i),this.setState({addedItemIndex:l.length-1}),a({[t]:l}),this.initControlScript()};handleOnChange=(e,t,a)=>{const{blockAttributeKey:l,setAttributes:i}=this.props,n=this.getItems();"object"==typeof e?e.key&&e.childKey?n[a][e.key][e.childKey]=t:n[a][e.key]=t:n[a][e]=t,i({[l]:n})};getRepeaterItemValues=(e,t)=>{const a=this.getItems();let l;return l="object"==typeof e?e.key&&e.childKey?a[t][e.key][e.childKey]:a[t][e.key]:a[t][e],ie(l)};handleOnRemove=e=>{const{blockAttributeKey:t,setAttributes:a}=this.props,l=this.getItems();l.splice(e,1),a({[t]:l}),this.initControlScript()};handleDuplicateItem=e=>{const{options:t,blockAttributeKey:a,setAttributes:l}=this.props,i=this.getItems();let n={};t.map(t=>{n[t.optionKey]=i[e][t.optionKey]}),i.splice(e+1,0,n),l({[a]:i}),this.initControlScript()};handleOnDrag=(e,t)=>{const{blockAttributeKey:a,setAttributes:l}=this.props,i=this.getItems();let n=(o=i,r=e,s="up"===t?e-1:e+1,function(e,t,a){const l=t<0?e.length+t:t;if(l>=0&&l<e.length){const l=a<0?e.length+a:a,[i]=e.splice(t,1);e.splice(l,0,i)}}(o=[...o],r,s),o);var o,r,s;l({[a]:n}),this.initControlScript()};showItems=()=>{const{options:t,blockAttributes:a,blockAttributeKey:l,setAttributes:i}=this.props,n=this.getItems();return n.length>0&&wp.element.createElement("div",{className:"qodef-repeater-items"},n.map((o,r)=>wp.element.createElement("div",{className:"qodef-repeater-item "+(this.state.addedItemIndex===r?"qodef--active":""),key:r},wp.element.createElement("div",{className:"qodef-repeater-item-heading"},wp.element.createElement("span",{className:"qodef-repeater-item-heading-label"},(0,e.__)(`Item ${r+1}`,"qi-blocks")),wp.element.createElement("div",{className:"qodef-repeater-item-action"},n.length>1&&wp.element.createElement(wp.element.Fragment,null,0!==r&&wp.element.createElement(y.Button,{className:"qodef-repeater-button qodef--move-up",icon:"arrow-up-alt2",text:"",showTooltip:!0,label:(0,e.__)("Move Up","qi-blocks"),onClick:()=>this.handleOnDrag(r,"up")}),n.length!==r+1&&wp.element.createElement(y.Button,{className:"qodef-repeater-button qodef--move-down",icon:"arrow-down-alt2",text:"",showTooltip:!0,label:(0,e.__)("Move Down","qi-blocks"),onClick:()=>this.handleOnDrag(r,"down")})),wp.element.createElement(y.Button,{className:"qodef-repeater-button qodef--duplicate",icon:"admin-page",text:"",showTooltip:!0,label:(0,e.__)("Duplicate Item","qi-blocks"),onClick:()=>this.handleDuplicateItem(r)}),wp.element.createElement(y.Button,{className:"qodef-repeater-button qodef--remove",icon:"no-alt",text:"",showTooltip:!0,label:(0,e.__)("Remove Item","qi-blocks"),onClick:()=>this.handleOnRemove(r)}))),wp.element.createElement("div",{className:"qodef-repeater-item-options"},t.map((e,t)=>{const o=e.optionType;let s=e.optionAttributes||{};const c=e.advancedOptions||!1,u=e.dependency||{},m=Object.prototype.hasOwnProperty.call(u,"value")&&Object.prototype.hasOwnProperty.call(u,"key"),p="string"==typeof u.value?[u.value]:u.value,d=Object.prototype.hasOwnProperty.call(u,"isGlobal")?a[u.key]:n[r][u.key];return s=c?{...s,blockAttributeKey:l,blockAttributes:a,setAttributes:i,repeater:!0,repeaterItemIndex:r,repeaterItemKey:e.optionKey,repeaterSetAttributes:this.handleOnChange,repeaterGetAttributes:this.getRepeaterItemValues}:{...s,onChange:t=>this.handleOnChange(e.optionKey,t,r)},wp.element.createElement("div",{key:t,className:"qodef-repeater-item-option"},(m&&p.includes(d)||!m)&&wp.element.createElement(o,ca({label:e.label||"",placeholder:e.placeholder||"",value:n[r][e.optionKey]},s)))})))))};render(){const{label:t}=this.props;return wp.element.createElement("div",{className:"qodef-repeater-option"},t&&wp.element.createElement("label",{className:"qodef-option-label"},t),this.showItems(),wp.element.createElement(y.Button,{className:"qodef-repeater-button qodef--add",isSecondary:!0,text:(0,e.__)("Add Item","qi-blocks"),onClick:this.handleAddItem}))}}ua.defaultProps={label:(0,e.__)("Items","qi-blocks"),options:[{label:(0,e.__)("Title","qi-blocks"),optionType:y.TextControl,optionKey:"itemTitle",optionDefaultValue:"",optionAttributes:{},advancedOptions:!1,dependency:{}}],blockAttributeKey:"",blockAttributes:{},setAttributes:()=>{},isRichText:!1};const ma=ua,pa=wp.apiFetch;var da=a.n(pa);class ba extends ve.Component{constructor(){super(...arguments),this.state={screen:v(),imageId:"",customImageSizeLoading:!1,externalImageIsSet:!1,imageSizeNotExist:!1}}getScreenLabelSuffix(){return J(this.state.screen)}getAttributeName(e){const{attrNameTemplate:t}=this.props;return X(t,e)}getAttributeValue(e,t=this.getScreenLabelSuffix()){const{blockAttributes:a,allowScreens:l,repeater:i,repeaterItemIndex:n,repeaterItemKey:o,repeaterGetAttributes:r}=this.props;let s=e;l&&t&&(s=e+t);let c=a[s];return i&&(c=r({key:o,childKey:s},n)),ie(c)}setAttributeValue(e,t,a=this.getScreenLabelSuffix()){const{setAttributes:l,allowScreens:i,repeater:n,repeaterItemIndex:o,repeaterItemKey:r,repeaterSetAttributes:s}=this.props;let c=e;i&&a&&(c=e+a),n?s({key:r,childKey:c},t,o):l({[c]:t})}componentDidMount(){const{allowDefaultImage:e,defaultImageURL:t,allowScreens:a}=this.props,{url:l,id:i,defaultValueIsSet:n}=this.getAttributeValue(this.getAttributeName("Image"));l&&!l.includes(qiBlocksEditor.vars.siteURL)?(this.onSelectURL(l),this.setState({externalImageIsSet:!0})):(l&&(0,Ne.isBlobURL)(l)&&!i&&this.setAttributeValue(this.getAttributeName("Image"),{url:"",alt:"",caption:"",html:""}),a&&["Tablet","Mobile"].map(e=>{const{url:t,id:a}=this.getAttributeValue(this.getAttributeName("Image"),e);t&&(0,Ne.isBlobURL)(t)&&!a&&this.setAttributeValue(this.getAttributeName("Image"),{url:"",alt:"",caption:"",html:""},e)}),!e||n||l||i||this.setAttributeValue(this.getAttributeName("Image"),{id:null,url:t||qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder,caption:"",html:""}),i&&(this.setState({imageId:i}),this.updateImageSizeOption(i)))}setSVGIcon=(e,t,a,l)=>{const i=new XMLHttpRequest;null!=i&&(i.open("GET",t,!0),i.onreadystatechange=()=>{4===i.readyState&&200===i.status&&this.setAttributeValue(this.getAttributeName("Image"),{id:e,url:t,alt:a,caption:l,html:Dt.sanitize(i.responseText,{USE_PROFILES:{svg:!0,svgFilters:!0}})})},i.send())};onSelectImage=({id:e,url:t,alt:a,caption:l})=>{this.setAttributeValue(this.getAttributeName("ImageSize"),""),t.includes(".svg")?this.setSVGIcon(e,t,a,l):this.setAttributeValue(this.getAttributeName("Image"),{id:e,url:t,alt:a,caption:l}),this.setState({imageId:e,externalImageIsSet:!1}),this.updateImageSizeOption(e)};updateImageSizeOption=e=>{if(this.props.allowImageSizes){let t=0;const a=setInterval(()=>{((0,o.select)("core").getMedia(e)||t>5)&&(clearInterval(a),this.forceUpdate()),t++},1e3)}};onSelectURL=e=>{e.includes(".svg")?this.setSVGIcon(null,e,"",""):this.setAttributeValue(this.getAttributeName("Image"),{id:null,url:e,alt:"",caption:"",html:""}),this.setAttributeValue(this.getAttributeName("ImageSize"),""),this.setState({externalImageIsSet:!1})};onUploadError=e=>{const{noticeOperations:t}=this.props;t.createErrorNotice(e)};removeImage=()=>{this.setAttributeValue(this.getAttributeName("Image"),{id:null,url:"",alt:"",caption:"",html:"",defaultValueIsSet:!!this.props.allowDefaultImage})};getImageSizes(){const{imageSizes:t,additionalImageSizes:a}=this.props,l=this.getAttributeValue(this.getAttributeName("Image"));let i=[];if(l){const n=(0,o.select)("core").getMedia(l.id);if(!n)return[];const r=n.media_details.sizes;r&&0===Object.keys(r).length&&i.push({label:(0,e.__)("Default","qi-blocks"),value:""});for(const e in r){const a=t.find(t=>t.slug===e);a&&i.push({label:a.name,value:e})}a&&a.length>1&&a.map(e=>{i.push({label:e.label,value:e.value})}),i.push({label:(0,e.__)("Custom","qi-blocks"),value:"custom"})}return i}onImageSizeChange=e=>{this.setAttributeValue(this.getAttributeName("ImageSize"),e);const t=(0,o.select)("core").getMedia(this.state.imageId);if(t){let a=t.source_url;""!==e&&(a=this.getImageURLbySize(e)||t.source_url),"custom"===e?this.getImageURLbyCustomSize(e):this.setAttributeValue(this.getAttributeName("Image"),{id:t.id,url:a,alt:t.alt_text||"",caption:t.caption&&t.caption.raw||""})}};getImageURLbySize(e){const t=this.getAttributeValue(this.getAttributeName("Image"));let a="";if(t){const l=(0,o.select)("core").getMedia(t.id);if(!l)return"";this.setState({customImageSizeLoading:!0});const i=l.media_details.sizes;if(i&&0===Object.keys(i).length)this.setState({imageSizeNotExist:!0,customImageSizeLoading:!1});else{this.setState({imageSizeNotExist:!1,customImageSizeLoading:!1});for(const t in i){if(t===e){a=i[t].source_url;break}if(t.includes("qi_blocks_image_size_"+e.replace("-","_"))){a=i[t].source_url;break}}}["","custom"].includes(e)&&this.setState({imageSizeNotExist:!1})}return a}getImageURLbyCustomSize=()=>{const e=(0,o.select)("core").getMedia(this.state.imageId);if(e){let t=e.source_url;const a=parseInt(this.getAttributeValue(this.getAttributeName("ImageCustomWidth")),10),l=parseInt(this.getAttributeValue(this.getAttributeName("ImageCustomHeight")),10);t&&a&&l&&(this.setState({customImageSizeLoading:!0}),da()({method:"POST",path:"/qi-blocks/v1/resize-image",data:{image_id:this.state.imageId,custom_size:{width:a,height:l}}}).then(a=>{"success"===a.status&&(t=a.data.url),this.setState({customImageSizeLoading:!1}),this.setAttributeValue(this.getAttributeName("Image"),{id:e.id,url:t,alt:e.alt_text||"",caption:e.caption&&e.caption.raw||""})}))}};render(){const t={...this.props},a={...this.state},{label:l,noticeUI:i,allowScreens:n,allowImageSizes:o}=t,r=this.getAttributeValue(this.getAttributeName("Image")),{id:s,url:c,alt:u,html:m}=r;return t.onChangeScreen=e=>{this.setState({screen:e}),this.updateImageSizeOption(s)},wp.element.createElement(y.BaseControl,{className:"qodef-advanced-image-option qodef-image-option"},wp.element.createElement("div",{className:"qodef-advanced-select-heading"},n?wp.element.createElement(xe,{label:l,onChangeScreen:t.onChangeScreen}):wp.element.createElement(wp.element.Fragment,null,l&&wp.element.createElement("label",{className:"qodef-option-label"},l))),c?wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("div",{className:"qodef-image-option-inner"},((0,Ne.isBlobURL)(c)||a.customImageSizeLoading)&&wp.element.createElement("div",{className:"qodef-image-option-spinner"},wp.element.createElement(y.Spinner,null)),wp.element.createElement(ke.MediaUploadCheck,null,wp.element.createElement(ke.MediaUpload,{allowedTypes:["image"],value:s,onSelect:this.onSelectImage,render:({open:t})=>wp.element.createElement(wp.element.Fragment,null,wp.element.createElement("img",{src:c,alt:u}),wp.element.createElement("div",{className:"qodef-image-option-actions"},wp.element.createElement(y.Button,{icon:"edit",showTooltip:!0,label:(0,e.__)("Edit Image","qi-blocks"),onClick:t}),wp.element.createElement(y.Button,{icon:"trash",showTooltip:!0,label:(0,e.__)("Remove Image","qi-blocks"),onClick:this.removeImage})))}))),a.imageSizeNotExist&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("The Image has no predefined sizes, please set a custom image size.","qi-blocks")),a.externalImageIsSet&&wp.element.createElement("p",{className:"qodef-image-notice"},(0,e.__)("External image URL is set, please upload your image for this Element.","qi-blocks"))):wp.element.createElement(ke.MediaPlaceholder,{allowedTypes:["image"],icon:"format-image",onSelect:this.onSelectImage,onSelectURL:this.onSelectURL,onError:this.onUploadError,notices:i}),o&&s&&!m&&wp.element.createElement("div",{className:"qodef-image-option-sizes"},this.getImageSizes()&&this.getImageSizes().length>0?wp.element.createElement(y.SelectControl,{label:(0,e.__)("Image Size","qi-blocks"),options:this.getImageSizes(),onChange:this.onImageSizeChange,value:this.getAttributeValue(this.getAttributeName("ImageSize"))||"full"}):wp.element.createElement(y.Spinner,null),"custom"===this.getAttributeValue(this.getAttributeName("ImageSize"))&&wp.element.createElement("div",{className:"qodef-image-option-custom-size"},wp.element.createElement("label",{className:"qodef-option-label"},(0,e.__)("Custom Image Size","qi-blocks")),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Width","qi-blocks"),value:this.getAttributeValue(this.getAttributeName("ImageCustomWidth")),onChange:e=>this.setAttributeValue(this.getAttributeName("ImageCustomWidth"),ae(e)),min:1,max:2560,step:1}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Height","qi-blocks"),value:this.getAttributeValue(this.getAttributeName("ImageCustomHeight")),onChange:e=>this.setAttributeValue(this.getAttributeName("ImageCustomHeight"),ae(e)),min:1,max:2560,step:1}),wp.element.createElement(y.Button,{isPrimary:!0,text:(0,e.__)("Apply Changes","qi-blocks"),onClick:this.getImageURLbyCustomSize}))))}}ba.defaultProps={label:(0,e.__)("Image","qi-blocks"),attrNameTemplate:"",blockAttributes:{},setAttributes:()=>{},allowDefaultImage:!1,defaultImageURL:"",allowScreens:!1,allowImageSizes:!0,additionalImageSizes:[],repeater:!1,repeaterItemIndex:0,repeaterItemKey:"",repeaterSetAttributes:()=>{},repeaterGetAttributes:()=>{}};const ga=(0,o.withSelect)(e=>({imageSizes:e("core/block-editor")?.getSettings()?.imageSizes}))((0,y.withNotices)(ba)),fa=e=>{const t=t=>X(e.attrNameTemplate,e.attrName,t),a=le(e,"all")&&void 0!==e.disableDirections&&e.disableDirections.length>0?e.disableDirections:[],l=le(e,"all")&&void 0!==e.isImportant&&e.isImportant?" !important":"",{blockAttributes:i}=e,n=["Top","Right","Bottom","Left"];let o={},r={},s={};return Object.entries(k).map(([c])=>{const u=J(c),m=t("Unit"+u),p="p"===i[m]?"%":i[m]||"px";[...n].map((m,d)=>{const b=i[t(m+u)],g=i[t(`${m}Decimal`+u)];if(le(b)||le(g)){let t;const i=e.attrName?e.attrName.toLowerCase():"";if(i.includes("border")){if(i.includes("width"))t=`border${m}Width`;else if(i.includes("radius")){let e,a,l;a=d%2?n[d-1]:m,l=d%2?m:n[n.length-d-1],e=`${a}${l}`,t=`border${e}Radius`}}else t=e.attrName?`${i}${m}`:m.toLowerCase();let u="";if(ee(p)&&""!==b?u=a.length>0&&a.includes(m)?"":parseInt(b,10)+p:te(p)&&""!==g&&(u=a.length>0&&a.includes(m)?"":parseFloat(g)+p),u)switch(c){case"desktop":o[t]=u+l;break;case"tablet":r[t]=u+l;break;case"mobile":s[t]=u+l}}})}),{desktop:o,tablet:r,mobile:s}};fa.defaultProps={attrNameTemplate:"",attrName:"",blockAttributes:{},disableDirections:[],isImportant:!1};const ha=fa,ka=e=>{const{blockAttributes:t}=e,a=le(e,"all")&&e.attrNameTemplate||"",l=le(e,"all")&&e.attrName||"Background",i=(e,t)=>X(a,l+e,t);let n={},o={},r={};return t[i("Attachment")]&&(n.backgroundAttachment=t[i("Attachment")]),Object.entries(k).map(([e])=>{let a=J(e),l={};if(t[i("Image",a)]&&t[i("Image",a)].url&&(l.backgroundImage=`url(${t[i("Image",a)].url})`),t[i("Repeat",a)]&&(l.backgroundRepeat=t[i("Repeat",a)]),"custom"===t[i("Position",a)]){let e="",n="";(t[i("XPosition",a)]||t[i("XPositionDecimal",a)])&&(ee(t[i("XPositionUnit",a)])&&t[i("XPosition",a)]?e=parseInt(t[i("XPosition",a)],10)+t[i("XPositionUnit",a)]:te(t[i("XPositionUnit",a)])&&t[i("XPositionDecimal",a)]&&(e=parseFloat(t[i("XPositionDecimal",a)])+t[i("XPositionUnit",a)])),(t[i("YPosition",a)]||t[i("YPositionDecimal",a)])&&(ee(t[i("YPositionUnit",a)])&&t[i("YPosition",a)]?n=parseInt(t[i("YPosition",a)],10)+t[i("YPositionUnit",a)]:te(t[i("YPositionUnit",a)])&&t[i("YPositionDecimal",a)]&&(n=parseFloat(t[i("YPositionDecimal",a)])+t[i("YPositionUnit",a)])),""===e&&""===n||(l.backgroundPosition=e+" "+n)}else t[i("Position",a)]&&(l.backgroundPosition=t[i("Position",a)]);"custom"===t[i("Size",a)]?(t[i("SizeWidth",a)]||t[i("SizeWidthDecimal",a)])&&(ee(t[i("SizeWidthUnit",a)])&&t[i("SizeWidth",a)]?l.backgroundSize=parseInt(t[i("SizeWidth",a)],10)+t[i("SizeWidthUnit",a)]+" auto":te(t[i("SizeWidthUnit",a)])&&t[i("SizeWidthDecimal",a)]&&(l.backgroundSize=parseFloat(t[i("SizeWidthDecimal",a)])+t[i("SizeWidthUnit",a)]+" auto")):t[i("Size",a)]&&(l.backgroundSize=t[i("Size",a)]),Object.keys(l).length>0&&Object.entries(l).map(([t,a])=>{switch(e){case"desktop":n[t]=a;break;case"tablet":o[t]=a;break;case"mobile":r[t]=a}})}),{desktop:n,tablet:o,mobile:r}};ka.defaultProps={attrNameTemplate:"",attrName:"Background",blockAttributes:{}};const _a=ka,va=e=>{const{blockAttributes:t}=e,a=le(e,"all")&&e.attrNameTemplate||"",l=(e,t)=>X(a,e,t),i=t[l("BackgroundType")]||"";let n={},o={},r={};if("gradient"===i){let e={type:"linear",position:"",color_1:"",location_1:"",color_2:"",location_2:""};t[l("BackgroundGradientColor1")]&&(e.color_1=t[l("BackgroundGradientColor1")]),le(t[l("BackgroundGradientLocation1")])&&(e.location_1=ae(t[l("BackgroundGradientLocation1")])+"%"),t[l("BackgroundGradientColor2")]&&(e.color_2=t[l("BackgroundGradientColor2")]),le(t[l("BackgroundGradientLocation2")])&&(e.location_2=ae(t[l("BackgroundGradientLocation2")])+"%"),t[l("BackgroundGradientType")]&&(e.type=t[l("BackgroundGradientType")]),"linear"===e.type&&""!==t[l("BackgroundGradientTypeAngle")]?e.position=ae(t[l("BackgroundGradientTypeAngle")])+"deg":"radial"===e.type&&t[l("BackgroundGradientTypePosition")]&&(e.position="at "+t[l("BackgroundGradientTypePosition")]),e.type&&e.position&&e.color_1&&e.location_1&&e.color_2&&e.location_2?(n.backgroundColor="transparent",n.backgroundImage=`${e.type}-gradient(${e.position}, ${e.color_1} ${e.location_1}, ${e.color_2} ${e.location_2})`):e.color_1&&(n.backgroundColor=e.color_1)}else"video"===i?!t[l("BackgroundVideoPlayOnMobile")]&&t[l("BackgroundVideoFallbackImage")]&&t[l("BackgroundVideoFallbackImage")].url&&(o.backgroundImage=`url(${t[l("BackgroundVideoFallbackImage")].url})`,o.backgroundPosition="center",o.backgroundSize="cover"):(t[l("BackgroundColor")]&&(n.backgroundColor=t[l("BackgroundColor")]),r=_a({attrNameTemplate:a,blockAttributes:t}));return he()({desktop:n,tablet:{},mobile:o},r)};va.defaultProps={attrNameTemplate:"",blockAttributes:{}};const ya=va,wa=e=>{const{blockAttributes:t}=e,a=le(e,"all")&&e.attrNameTemplate||"",l=le(e,"all")&&e.disableWidthDirections||[],i=!le(e,"all")||(e.allowBorderColor??!0),n=(e,t)=>X(a,e,t);let o={},r={};const s=!le(e,"all")||(e.allowBorderRadius??!0)?ha({blockAttributes:t,attrNameTemplate:a,attrName:"BorderRadius",disableDirections:l}):{};return t[n("BorderStyle")]&&(o.borderStyle=t[n("BorderStyle")],i&&t[n("BorderColor")]&&(o.borderColor=t[n("BorderColor")]),r=ha({attrNameTemplate:a,attrName:"BorderWidth",blockAttributes:t})),he()({desktop:o,tablet:{},mobile:{}},r,s)};wa.defaultProps={attrNameTemplate:"",allowBorderColor:!0,allowBorderRadius:!0,blockAttributes:{}};const Aa=wa,Ia=e=>{const{blockAttributes:t,excludeOptions:a}=e,l=le(e,"all")&&e.attrNameTemplate||"",i=(e,t)=>X(l,e,t);let n={},o={x:0,y:0,blur:0,spread:0,color:"",position:""};var r;return t[i("BoxShadowColor")]&&(o.color=t[i("BoxShadowColor")]),""!==t[i("BoxShadowHorizontal")]&&(o.x=t[i("BoxShadowHorizontal")]),""!==t[i("BoxShadowVertical")]&&(o.y=t[i("BoxShadowVertical")]),""!==t[i("BoxShadowBlur")]&&(o.blur=t[i("BoxShadowBlur")]),""!==t[i("BoxShadowSpread")]&&(o.spread=t[i("BoxShadowSpread")]),r="position",a&&a.length&&a.includes(r)||!t[i("BoxShadowPosition")]||(o.position=t[i("BoxShadowPosition")]),o.color&&(n.boxShadow=o.x+"px "+o.y+"px "+o.blur+"px "+o.spread+"px "+o.color+" "+o.position),{desktop:n,tablet:{},mobile:{}}};Ia.defaultProps={attrNameTemplate:"",blockAttributes:{}};const Sa=Ia,xa=e=>{const{blockAttributes:t}=e,a=(e,t="")=>X("",e,t),l=le(e,"all")&&e.excludePanels||[],i=le(e,"all")&&e.includePanels||[];let n=i&&i.length?i:j();l&&l.length&&l.forEach(e=>{n.splice(n.indexOf(e),1)});let o={},r={},s={},c={},u={};n.includes("advanced")&&(le(t[a("zIndex")])&&(o.zIndex=ae(t[a("zIndex")])),c=ha({attrName:a("Margin"),blockAttributes:t}),u=ha({attrName:a("Padding"),blockAttributes:t})),n.includes("motion-effects")&&void 0!==t[a("EntranceAnimation")]&&""!==t[a("EntranceAnimation")]&&t[a("EntranceAnimationDelay")]&&(o.animationDelay=ae(t[a("EntranceAnimationDelay")])+"ms");let m={};n.includes("background")&&(m=ya({attrNameTemplate:"Advanced",blockAttributes:t}));let p={};if(n.includes("border")){const e=Aa({attrNameTemplate:"Advanced",blockAttributes:t}),a=Sa({attrNameTemplate:"Advanced",blockAttributes:t});p=he()(e,a)}if(n.includes("positioning")){le(t[a("BlockPosition")])&&(o.position=t[a("BlockPosition")]);const e=t[a("PositionHorizontalOrientation")],l=t[a("PositionVerticalOrientation")];Object.entries(k).map(([i])=>{let n=J(i),c={};"custom"!==t[a("BlockWidth")]&&"custom"!==t[a("BlockWidth",n)]||!t[a("BlockCustomWidth",n)]&&!t[a("BlockCustomWidthDecimal",n)]||(ee(t[a("BlockCustomWidthUnit",n)])&&t[a("BlockCustomWidth",n)]?(c.width=parseInt(t[a("BlockCustomWidth",n)],10)+t[a("BlockCustomWidthUnit",n)],c.maxWidth=parseInt(t[a("BlockCustomWidth",n)],10)+t[a("BlockCustomWidthUnit",n)]):te(t[a("BlockCustomWidthUnit",n)])&&t[a("BlockCustomWidthDecimal",n)]&&(c.width=parseFloat(t[a("BlockCustomWidthDecimal",n)])+t[a("BlockCustomWidthUnit",n)],c.maxWidth=parseFloat(t[a("BlockCustomWidthDecimal",n)])+t[a("BlockCustomWidthUnit",n)])),""===ie(t[a("PositionHorizontalOffset",n)])&&""===ie(t[a("PositionHorizontalOffsetDecimal",n)])||(ee(t[a("PositionHorizontalOffsetUnit",n)])&&""!==ie(t[a("PositionHorizontalOffset",n)])?c[e]=parseInt(t[a("PositionHorizontalOffset",n)],10)+t[a("PositionHorizontalOffsetUnit",n)]:te(t[a("PositionHorizontalOffsetUnit",n)])&&""!==ie(t[a("PositionHorizontalOffsetDecimal",n)])&&(c[e]=parseFloat(t[a("PositionHorizontalOffsetDecimal",n)])+t[a("PositionHorizontalOffsetUnit",n)])),""===ie(t[a("PositionVerticalOffset",n)])&&""===ie(t[a("PositionVerticalOffsetDecimal",n)])||(ee(t[a("PositionVerticalOffsetUnit",n)])&&""!==ie(t[a("PositionVerticalOffset",n)])?c[l]=parseInt(t[a("PositionVerticalOffset",n)],10)+t[a("PositionVerticalOffsetUnit",n)]:te(t[a("PositionVerticalOffsetUnit",n)])&&""!==ie(t[a("PositionVerticalOffsetDecimal",n)])&&(c[l]=parseFloat(t[a("PositionVerticalOffsetDecimal",n)])+t[a("PositionVerticalOffsetUnit",n)])),Object.keys(c).length>0&&Object.entries(c).map(([e,t])=>{switch(i){case"desktop":o[e]=t;break;case"tablet":r[e]=t;break;case"mobile":s[e]=t}})})}return o={desktop:o,tablet:r,mobile:s},he()(o,c,u,m,p)};xa.defaultProps={blockAttributes:{},excludePanels:[],includePanels:[]};const qa=xa;let Ea=[];const Ta=qiBlocksEditor.vars.systemFontOptions,Ca=e=>{let t=!0;return e||(t=!1),Ta&&Ta.map(({value:e})=>e).forEach(a=>{""!==a&&e===a&&(t=!1)}),t},Na=e=>{Object.keys(e).filter(e=>e.match(/fontfamily/i)).forEach(t=>{const a=e[t];a&&setTimeout(()=>{(e=>{if(qiBlocksEditor.qodefGetCurrentBlockElement.getIframe()&&(Ea=[]),Ea.includes(e))return;const t=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument();if(t&&Ca(e)){const a=t.createElement("link");a.setAttribute("href",(e=>`https://fonts.googleapis.com/css?family=${e.replace(/ /g,"+")}:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic&subset=latin-ext`)(e)),a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),t.querySelector("head").appendChild(a)}Ea.push(e)})(a)},400)})},Pa=(0,_e.createHigherOrderComponent)(e=>class extends ve.Component{static defaultProps={attributes:{}};componentDidMount(){Na(this.props.attributes)}render(){return wp.element.createElement(e,this.props)}},"withGoogleFont"),Oa=(0,_e.createHigherOrderComponent)(e=>class extends ve.Component{static defaultProps={clientId:"",attributes:{},setAttributes:()=>{}};componentDidMount(){const{clientId:e,attributes:t,setAttributes:a}=this.props;t.uniqueClass||a({uniqueClass:this.getNewUniqueClass(e)}),this.reInitUniqueClass(!0)}getNewUniqueClass(e){let t="qodef-block-";return this.props.isFullSiteEditor?t="qodef-template-block-":"widget"===this.props.postID&&(t="qodef-widget-block-"),`${t}${e.substring(0,8)}`}hasParent(e,t){let a=!1,l=e?.parentNode;for(;l;){let e=l;if(e&&e?.classList?.contains(t)){a=!0;break}if(!e?.parentNode)break;l=e.parentNode}return a}reInitUniqueClass(e){const{clientId:t,attributes:a,setAttributes:l,isFullSiteEditor:i}=this.props,{uniqueClass:n}=a,o=qiBlocksEditor.qodefGetCurrentBlockElement.getCurrentDocument(),r=this.getNewUniqueClass(t);let s=!1;if(i){if(n.includes("qodef-block")||n.includes("qodef-widget")){const e=o.querySelector(`.${n}`);if(e){this.hasParent(e,"wp-block-post-content")||(s=!0)}}e&&o.addEventListener("paste",()=>{s=!0})}!i&&n.includes("qodef-template-block")&&(s=!0),""!==n&&n!==r&&o.querySelectorAll(`.${n}`).length>1&&(s=!0),s&&l({uniqueClass:r})}render(){return this.reInitUniqueClass(),wp.element.createElement(e,this.props)}},"withUniqueClass"),Ba=Oa;function Va(){return Va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},Va.apply(null,arguments)}let Da=[],Ra={family:[],weight:[],style:[]};const La=e=>{let t="";return Object.entries(e).map(([e,a])=>{if(e.match(/fontfamily/i)){const e=a.replace(/["']/g,"");!Da.includes(e)&&Ca(e)&&(Ra.family.push(e),Da.push(e))}e.match(/fontweight/i)&&Ra.weight.push(parseInt(a,10)),e.match(/fontstyle/i)&&Ra.style.push(a),t+=`${e.replace(/([A-Z])/g,(e,t,a)=>(a>0?"-":"")+e.toLowerCase())}: ${a};`}),t},Ma=(0,_e.createHigherOrderComponent)(e=>class extends ve.Component{addPageStyle(e){if(e){const t=this.postID;let a=this.getPageStyles||[],l={key:this.attributes.uniqueClass,values:[],fonts:[]};Da=[],Ra={family:[],weight:[],style:[]},e.forEach((i,n)=>{if(!Object.values(i.styles).every(e=>0===Object.keys(e).length)){const e=["widget","template"].includes(t)?"":`body[class*="-${t}"]`,a=`${e} ${i.selector}`,n=[];"string"!=typeof i.selector&&i.selector.forEach(t=>{t&&n.push(`${e} ${t}`)}),l.values.push({selector:n.length>1?n.join(","):a,styles:La(i.styles.desktop||""),tablet_styles:La(i.styles.tablet||""),mobile_styles:La(i.styles.mobile||""),custom_styles:i.custom_styles||[]}),l.fonts=Ra}if(n===e.length-1)if(a&&a.length){let e=!1;a.map((t,i)=>{t.key===l.key&&(e=!0,l.values.length?ge()(t.values,l.values)||(a[i].values=l.values,a[i].fonts=l.fonts):(a[i].values=[],a[i].fonts={family:[],weight:[],style:[]}))}),!e&&l.values.length&&a.push(l)}else"object"==typeof a&&Object.keys(a).length?(a=Object.values(a),a.push(l)):a.push(l);const o=a.filter(e=>e.values.length);qiBlocksEditor.vars.currentPageID=t,qiBlocksEditor.vars.currentPageStyles=o})}}render(){return wp.element.createElement(e,Va({},this.props,{addPageStyle:this.addPageStyle}))}},"withStyles"),Ua=(0,_e.compose)((0,o.withSelect)(e=>{let t=e("core/editor")?.getCurrentPostId()||"widget";const a=!!e("core/edit-site");let l="desktop";return e("core/edit-post")&&(l="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-post")?.__experimentalGetPreviewDeviceType()?.toLowerCase()),a&&(t="template",l="function"==typeof e("core/editor")?.getDeviceType?e("core/editor")?.getDeviceType()?.toLowerCase():e("core/edit-site").__experimentalGetPreviewDeviceType().toLowerCase()),{previewScreen:l,postID:t,getPageStyles:e("qi-blocks/data/with-styles").getOptions(t).data,isFullSiteEditor:a}}),Ba,Ma);var za=a(7584);class Ka extends ve.Component{componentDidMount(){this.initBlockScript()}componentDidUpdate(e){ge()(e.attributes,this.props.attributes)||this.initBlockScript()}initBlockScript(){"object"==typeof za.A&&za.A.initItem(this.props.attributes.uniqueClass)}render(){const{attributes:t,setAttributes:a,previewScreen:l}=this.props,{uniqueClass:i,mainImage:n,mainImageParallaxLevel:o,items:r}=t,s=H(t),c=qa({blockAttributes:t});let u={className:W(t),style:Q(c,l),...G(t)};s&&(u.id=s);const m=we()($("parallax-images",this.props),{}),p=ha({attrNameTemplate:"Main",attrName:"Padding",blockAttributes:t});let d=""!==ae(o)?ae(o):"";""!==d&&Number.isInteger(d)&&0===parseInt(d,10)&&(d="parallax-disabled");const b=Sa({attrNameTemplate:"Main",blockAttributes:t,excludeOptions:["position"]}),g=Sa({attrNameTemplate:"Parallax",blockAttributes:t,excludeOptions:["position"]});let f=[];return r&&r.length&&r.map((e,t)=>{const a=oe({attributes:e.itemImageWidth,blockAttrName:"itemImageWidth",cssProp:"width"}),n=oe({attributes:e.itemYOffset,blockAttrName:"itemYOffset",cssProp:e.itemImagePosition&&e.itemImagePosition.includes("bottom")?"bottom":"top"}),o=oe({attributes:e.itemXOffset,blockAttrName:"itemXOffset",cssProp:e.itemImagePosition&&e.itemImagePosition.includes("right")?"right":"left"}),r=oe({attributes:e,blockAttrName:"itemImageZIndex",cssProp:"zIndex"}),s=he()(a,n,o,r);((e,t=!0)=>{let a="";return Object.entries(e).map(([e,l])=>{a+=`${e.replace(/([A-Z])/g,(e,t,a)=>(a>0?"-":"")+e.toLowerCase())}: ${l} ${t?"!important":""};`}),a})(Q(s,l))&&f.push({selector:`.${i} .qi-block-parallax-images .qodef-m-images > *:nth-child(${t+2})`,styles:s})}),this.props.addPageStyle([{selector:`.${i}.qodef-block-container`,styles:c},{selector:`.${i} .qi-block-parallax-images`,styles:p},{selector:`.${i} .qi-block-parallax-images .qodef-e-main-image img`,styles:b},{selector:`.${i} .qi-block-parallax-images .qodef-e-parallax-image img`,styles:g},...f]),wp.element.createElement(wp.element.Fragment,null,wp.element.createElement(ke.InspectorControls,null,wp.element.createElement(y.TabPanel,{className:"qodef-tab-panel qodef--parallax-images",activeClass:"qodef--active",tabs:[{name:"content",title:(0,e.__)("Content","qi-blocks")},{name:"style",title:(0,e.__)("Style","qi-blocks")},{name:"advanced",title:(0,e.__)("Advanced","qi-blocks")}]},l=>wp.element.createElement(wp.element.Fragment,null,"content"===l.name&&wp.element.createElement(y.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(ga,{label:(0,e.__)("Image","qi-blocks"),attrNameTemplate:"Main",blockAttributes:t,setAttributes:a,allowDefaultImage:!0}),wp.element.createElement(y.TextControl,{type:"number",label:(0,e.__)("Main Image Parallax Level","qi-blocks"),help:(0,e.__)("Enter custom image parallax level","qi-blocks"),min:0,value:o,onChange:e=>a({mainImageParallaxLevel:parseInt(e,10)})}),wp.element.createElement(ma,{label:(0,e.__)("Items","qi-blocks"),blockAttributeKey:"items",blockAttributes:t,setAttributes:a,options:[{label:(0,e.__)("Image","qi-blocks"),optionType:ga,optionKey:"itemImage",optionDefaultValue:{image:{id:null,url:qiBlocksEditor.vars.defaultThumbnail,alt:qiBlocksEditor.vars.defaultImagePlaceholder},imageSize:"full"},optionAttributes:{allowDefaultImage:!0},advancedOptions:!0},{label:(0,e.__)("Image Position","qi-blocks"),optionType:y.SelectControl,optionKey:"itemImagePosition",optionDefaultValue:"bottom-left",optionAttributes:{options:[{value:"top-left",label:(0,e.__)("Top Left","qi-blocks")},{value:"top-right",label:(0,e.__)("Top Right","qi-blocks")},{value:"bottom-left",label:(0,e.__)("Bottom Left","qi-blocks")},{value:"bottom-right",label:(0,e.__)("Bottom Right","qi-blocks")}]}},{label:(0,e.__)("Image Width","qi-blocks"),optionType:$t,optionKey:"itemImageWidth",optionDefaultValue:{itemImageWidthUnit:"px",itemImageWidthUnitTablet:"px",itemImageWidthUnitMobile:"px"},optionAttributes:{rangeMax:500,rangeMin:0,rangeDecimalMax:100,unitType:"space",allowScreens:!0},advancedOptions:!0},{label:(0,e.__)("Vertical Offset","qi-blocks"),optionType:$t,optionKey:"itemYOffset",optionDefaultValue:{itemYOffsetUnit:"px",itemYOffsetUnitTablet:"px",itemYOffsetUnitMobile:"px"},optionAttributes:{rangeMax:200,rangeMin:-200,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"pxPercentVh",allowScreens:!0},advancedOptions:!0},{label:(0,e.__)("Horizontal Offset","qi-blocks"),optionType:$t,optionKey:"itemXOffset",optionDefaultValue:{itemXOffsetUnit:"px",itemXOffsetUnitTablet:"px",itemXOffsetUnitMobile:"px"},optionAttributes:{rangeMax:200,rangeMin:-200,rangeDecimalMax:100,rangeDecimalMin:-100,unitType:"pxPercentVw",allowScreens:!0},advancedOptions:!0},{label:(0,e.__)("Image Z Index","qi-blocks"),optionType:y.TextControl,optionKey:"itemImageZIndex",optionAttributes:{type:"number",min:-10,max:100}},{label:(0,e.__)("Image Parallax Level","qi-blocks"),optionType:y.TextControl,optionKey:"itemImageParallaxLevel",optionAttributes:{type:"number",min:-100,max:100}}]})),"style"===l.name&&wp.element.createElement(y.BaseControl,{className:"qodef-base-control-container"},wp.element.createElement(Ee,{label:(0,e.__)("Padding","qi-blocks"),attrNameTemplate:"Main",attrName:"Padding",setAttributes:a,blockAttributes:t}),wp.element.createElement(aa,{label:(0,e.__)("Main Image Shadow","qi-blocks"),attrNameTemplate:"Main",blockAttributes:t,setAttributes:a,excludeOptions:["position"],popup:!0}),wp.element.createElement(aa,{label:(0,e.__)("Parallax Images Shadow","qi-blocks"),attrNameTemplate:"Parallax",blockAttributes:t,setAttributes:a,excludeOptions:["position"],popup:!0})),"advanced"===l.name&&wp.element.createElement(ia,{blockAttributes:t,setAttributes:a})))),wp.element.createElement("div",u,wp.element.createElement("div",{className:m,style:Q(p,l)},wp.element.createElement("div",{className:"qodef-m-images"},wp.element.createElement("div",{className:"qodef-e-main-image-holder"},wp.element.createElement("div",{className:"qodef-e-main-image-zoom-holder"},n&&n.url&&wp.element.createElement("div",{className:"qodef-e-main-image","data-parallax-main":d},wp.element.createElement("img",{className:""+(n.id?`wp-image-${n.id}`:""),src:n.url,alt:n.alt,style:Q(b,l)})))),r&&r.length>0&&r.map(e=>{let t=""!==ae(e.itemImageParallaxLevel)?ae(e.itemImageParallaxLevel):"";Number.isInteger(t)&&0===t&&(t="parallax-disabled");const a=oe({attributes:e.itemImageWidth,blockAttrName:"itemImageWidth",cssProp:"width"}),i=oe({attributes:e.itemYOffset,blockAttrName:"itemYOffset",cssProp:e.itemImagePosition&&e.itemImagePosition.includes("bottom")?"bottom":"top"}),n=oe({attributes:e.itemXOffset,blockAttrName:"itemXOffset",cssProp:e.itemImagePosition&&e.itemImagePosition.includes("right")?"right":"left"}),o=oe({attributes:e,blockAttrName:"itemImageZIndex",cssProp:"zIndex"}),r=he()(a,i,n,o);return e.itemImage&&e.itemImage.image&&wp.element.createElement("div",{className:"qodef-e-parallax-image "+(e.itemImagePosition?"qodef-position--"+e.itemImagePosition:""),"data-parallax":t,style:Q(r,l)},wp.element.createElement("img",{className:""+(e.itemImage.image.id?`wp-image-${e.itemImage.image.id}`:""),src:e.itemImage.image.url,alt:e.itemImage.image.alt,style:Q(g,l)}))})))))}}Ka.defaultProps={previewScreen:h};const ja=(0,_e.compose)(Ua,Pa)(Ka);class Fa extends ve.Component{render(){const{attributes:e}=this.props,{mainImage:t,mainImageParallaxLevel:a,items:l}=e,i=H(e);let n={className:W(e),...G(e)};i&&(n.id=i);const o=we()($("parallax-images",this.props),{});let r=""!==ae(a)?ae(a):"";return""!==r&&Number.isInteger(r)&&0===parseInt(r,10)&&(r="parallax-disabled"),wp.element.createElement("div",n,wp.element.createElement("div",{className:o},wp.element.createElement("div",{className:"qodef-m-images"},wp.element.createElement("div",{className:"qodef-e-main-image-holder"},wp.element.createElement("div",{className:"qodef-e-main-image-zoom-holder"},t&&t.url&&wp.element.createElement("div",{className:"qodef-e-main-image","data-parallax-main":r},wp.element.createElement("img",{className:""+(t.id?`wp-image-${t.id}`:""),src:t.url,alt:t.alt})))),l&&l.length>0&&l.map(e=>{let t=""!==ae(e.itemImageParallaxLevel)?ae(e.itemImageParallaxLevel):"";return Number.isInteger(t)&&0===t&&(t="parallax-disabled"),e.itemImage&&e.itemImage.image&&wp.element.createElement("div",{className:"qodef-e-parallax-image "+(e.itemImagePosition?"qodef-position--"+e.itemImagePosition:""),"data-parallax":t},wp.element.createElement("img",{className:""+(e.itemImage.image.id?`wp-image-${e.itemImage.image.id}`:""),src:e.itemImage.image.url,alt:e.itemImage.image.alt}))}))))}}const Wa=Fa,Ga={attributes:{items:[{itemImage:{image:{id:null,url:qiBlocksEditor.vars.defaultThumbnail,alt:qiBlocksEditor.vars.defaultImagePlaceholder},imageSize:"full"},itemImagePosition:"bottom-left",itemImageWidth:{itemImageWidthUnit:"px",itemImageWidthUnitTablet:"px",itemImageWidthUnitMobile:"px"},itemYOffset:{itemYOffsetUnit:"px",itemYOffsetUnitTablet:"px",itemYOffsetUnitMobile:"px"},itemXOffset:{itemXOffsetUnit:"px",itemXOffsetUnitTablet:"px",itemXOffsetUnitMobile:"px"},itemImageZIndex:"",itemImageParallaxLevel:""},{itemImage:{image:{id:null,url:qiBlocksEditor.vars.defaultThumbnail,alt:qiBlocksEditor.vars.defaultImagePlaceholder},imageSize:"full"},itemImagePosition:"top-right",itemImageWidth:{itemImageWidthUnit:"px",itemImageWidthUnitTablet:"px",itemImageWidthUnitMobile:"px"},itemYOffset:{itemYOffsetUnit:"px",itemYOffsetUnitTablet:"px",itemYOffsetUnitMobile:"px"},itemXOffset:{itemXOffsetUnit:"px",itemXOffsetUnitTablet:"px",itemXOffsetUnitMobile:"px"},itemImageZIndex:"",itemImageParallaxLevel:""}],mainImage:{id:null,url:qiBlocksEditor.vars.defaultImage,alt:qiBlocksEditor.vars.defaultImagePlaceholder,custom_image_size:""}}};var Ha,$a;function Ya(){return Ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},Ya.apply(null,arguments)}const Xa=e=>s.createElement("svg",Ya({xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",width:24,height:24},e),Ha||(Ha=s.createElement("path",{fill:"none",d:"M11 18.459H7.5v2.042H20V4.5H7.5v5.959H11z"})),$a||($a=s.createElement("path",{fill:"#EE2852",d:"M7 3v6.959H3v8h4v3.042h14V3zM4 16.959v-6h6v6H4m16 3.042H8v-2.042h3v-8H8V4h12z"})));(0,t.registerBlockType)("qi-blocks/parallax-images",{icon:wp.element.createElement(Xa,null),title:(0,e.__)("Parallax Image Showcase","qi-blocks"),description:(0,e.__)("Create visually attractive sections with images that move independently at different speeds on scroll.","qi-blocks"),category:"qi-blocks",keywords:[(0,e.__)("parallax","qi-blocks"),(0,e.__)("creative","qi-blocks"),(0,e.__)("animation","qi-blocks"),(0,e.__)("animated","qi-blocks"),(0,e.__)("interactive","qi-blocks"),(0,e.__)("scroll","qi-blocks"),(0,e.__)("qi","qi-blocks")],attributes:de,example:Ga,edit:ja,save:Wa})})()})();